Home server

Status
Not open for further replies.
#1
Further to previous post on this subject our home server is up and running again. Looks like it was a dodgy hard-drive, but time will tell. Lucky we are only doing it for the learning experience and not for pragmatic reasons!

A further problem we envisage is power cuts. Orpington (in Kent) or at least this particular part is prone to lots of short power cuts. We shall have to see what effect these have.

I have my eye on some redundant UPS in the office.

At the moment we are just running the Jastac site on this server.

The server is an old Dell Pweredge 300, circa 2001, 900mhz, 512mb ram running WAMP.

Does anyone know how to host 2 domains (or more) on one IP address?
 
#2
Does anyone know how to host 2 domains (or more) on one IP address?
No but if you find out kindly let me know too :)

I Installed XAMP on my new Vista and it works great, but I also want to set up different hosts (not for outside access, just on the intranet). Currently all I have is localhost.

It's something to do with setting virtual hosts, but my eyes glazed over when I read it and I got zip.

I don't even know how you set up one domain. Somethign to do with nameservers .... but I can't see that anywhere with the package.
 
#3
Christina,
Yes of course we will.

My son has also read the instructions and also got lost!
There is an excellent website & forum called Techspot where there are some members who specialise in this sort of thing.

Anyway I am sure we will find the answer eventually.
 
#4
Couldn't you just set your server config to listen to multiple ports - say port 80 and 8080 and then specify which site is served through each port; ie port 80=site1 and port8080=site2?
 
#6
No but if you find out kindly let me know too :)
... and me.

I've been having trouble updating the photos on my website (www.sessile-oak.co.uk). Also, I've changed over to using a Mac for the internet (G4 400 GB Ethernet running OS X 10.4.11) which doesn't support the webpage building software provided by the ISP, so I hope to use an old G4 400 (AGP Graphics) with a 10Gb HD as a server to host my own page, connected via its own single ADSL router port.
It seems to me that I may as well make provision to host some of my associates sites too while I'm about it. To this end, knowing how to accommodate multiple domains would come in very handy indeed - I see a bit of a learning curve thing looming.
 
#7
... and me.

I've been having trouble updating the photos on my website (www.sessile-oak.co.uk). Also, I've changed over to using a Mac for the internet (G4 400 GB Ethernet running OS X 10.4.11) which doesn't support the webpage building software provided by the ISP, so I hope to use an old G4 400 (AGP Graphics) with a 10Gb HD as a server to host my own page, connected via its own single ADSL router port.
It seems to me that I may as well make provision to host some of my associates sites too while I'm about it. To this end, knowing how to accommodate multiple domains would come in very handy indeed - I see a bit of a learning curve thing looming.
If you go into your Apache folder there are a number of htmls that cover hosting on the Mac. It is all pretty-much straight forward.

I serve up two pages, on my Mac G4 with 10.4.11 (not Server), through a single directory page. When I get around to getting dot coms for them I'll probably just open another port and place one per port.
 
#9
No but if you find out kindly let me know too :)

I don't even know how you set up one domain. Somethign to do with nameservers .... but I can't see that anywhere with the package.
What exactly do you want to do (he said opening up the can of worms)?
Generally speaking for a domain name to work you need an A record in DNS that points to the IP address where the website is hosted/ or if intranet the name of the host machine.
 
#10
Do you mean that your visitors will have to type in the port no. at the end of the URL?
No. Set up a DNS account somewhere as you mentioned. I use Dynamic DNS and have had no problems at all. It is simple and easy to set up. And best of all, it's free. If your running just one page, it will run your index.html from your website folder (mac 10.4.11). If you pay the aprx 10 bucks a year you don't have to manually reset it every month and you can add websites to it, up to ten I think. That's how I do my dirc. page (see here http://jmdirc.dnsdojo.com ). Once I get my pages rebuilt, I will buy a couple of dot coms and then re-set it to read through as xxxxx.com and yyyyy.com.
 
#11
Does anyone know how to host 2 domains (or more) on one IP address?
in httpd.conf add the following :

Namevirtualhost your_ip:port
<VirtualHost your-ip:port>
DocumentRoot /www/folder_containing_the_files_of_the_website
ServerName www.domain.com
</VirtualHost>
add the same for each another website
 
#12
Morocco. I have done that but whatever address is typed in the site comes up the same on both. Must be doing something wrong, any ideas?
 
#14
Firstly just so you have all the info;
Im using wampserver2:
apache 2.2.6
php 5.2.5
etc

in my httpd.conf file i have added this code:

_________________________________________
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/wamp/www/"

#everything above here was already present, i pasted the
#code below in

Namevirtualhost 80.177.111.63:80

<VirtualHost 80.177.111.63:80>
DocumentRoot /www
ServerName www.jastac.co.uk
</VirtualHost>

<VirtualHost 80.177.111.63:80>
DocumentRoot /www/roots/website1
ServerName www.flinks.org
</VirtualHost>
________________________________________-

However, i notice that i have a seperate file located at:
apache/conf/extra/httpd-vhosts.conf

which would appear to be the place to put this info, so i also put the code in this file (still doesnt work).


_______________________________________________
NameVirtualHost 80.177.111.63:80


#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

<VirtualHost 80.177.111.63:80>
ServerAdmin admin@jastac.co.uk
DocumentRoot "/www"
ServerName www.jastac.co.uk

</VirtualHost>

<VirtualHost 80.177.111.63:80>
ServerAdmin admin@jastac.co.uk
DocumentRoot "/www/roots/website1"
ServerName www.flinks.org

</VirtualHost>
_____________________________-

Il also mention that i havnt actually changed the dns a record for flinks.org(it still points to 1and1). but in my hosts file i added:
80.177.111.63 www.flinks.org

Now with all this done, whether i type in the browser www.jastac.co.uk or www.flinks.org
I get the same site - the one located in the /www folder.


If you have any idea how we can get this working that would be great!!
 
#16
However, i notice that i have a seperate file located at:
apache/conf/extra/httpd-vhosts.conf
raysor, no need to touch this file, and please check out the paths please, its must work
 
Last edited:
#17
They may appear to work but that is because flinks.org still points to my 1and1 server - i am just using a line in my host file to simulate it being hosted on my server.

Ok, i have removed any extra info in the virtualhosts file, and to confirm, my httpd.conf file reads:

ServerName 80.177.111.63:80
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/wamp/www/"
Namevirtualhost 80.177.111.63:80
<VirtualHost 80.177.111.63:80>
DocumentRoot /www
ServerName www.jastac.co.uk
</VirtualHost>
<VirtualHost 80.177.111.63:80>
DocumentRoot /www/roots/website1
ServerName www.flinks.org
</VirtualHost>

etc

the directory www/roots/website1
does exist, and in it there is a simple index.html file, a basic html page with a few hyperlinks on just for testing purposes.

However it still does not work, dont know why.

How exactly is this supposed to work anyway - if i had more of an idea might help to troubleshoot it?

obviously when i type in www.flinks.org, it queries the dns servers (and in my case the host file), and then it translates it to the ip address of my server: 80.177.111.63, then it sends a request to that ip address on port 80 for the webpage - but presumable for this virtual hosts thing to work, even after the dns name has been resolved to an ip, it still sends the dns name in the packet to the server - in order that the srever should know the request was made to that domain name... right?
 
Status
Not open for further replies.
Top