![]() |
Multiple websites on Apache 2.2
Hello All!
I've been running one site on Apache in a LAN network without any problems. But now I must run two sites on the same server. Both sites are in separate folders on the server but only one is running right (the first one I've set up). The new site is not displaying in browsers over the LAN at all ("Conection with server has been reset/lost during site load' - my translation) and on the PC where the server is it only displays pure .html (It Works! for instance) but not .php . Maybe my VirtualHosts are not set up properly? First site (working): Code:
<VirtualHost 192.168.5.222:80>Code:
<VirtualHost 192.168.5.222:81>Code:
NameVirtualHost 192.168.5.222:80Code:
#Any ideas? More info to give You better picture? All help will be appreciated. |
I have managed to run more than 1 apache site site before using either a IP-based hosts or Name-based virtual hosts http://httpd.apache.org/docs/1.3/vhosts/name-based.html
IP-based hosts is a simpler one for you do not need to configure DNS as opposed to Name-based where you need DNS to resolve the name of the virtual server. With IP-based, you need to create a virtual network interface under eth0. You can name it eth0:1 Unfortunately, I only know how to create a virtual interface using webmin. So I can help you if you are familiar with webmin or you are willing to try webmin. Webmin is easy to learn anyway. The only disadvantage of IP-based hosts that I have noticed is that you can only host one site at a time over the internet should you require to make your sites available on the internet. On your LAN its ok though because you can simply browse to the correct IP address. Having that in mind, I would say name based hosts is much better, it uses one IP address for all apache virtual hosts. Its also easy to setup using webmin and virtualmin. Virtualmin will automatically handle your DNS settings for you. I'm not sure if there are ways of overcoming that limitation in IP-based hosts, I'm just speaking from my knowledge and experience. Let me know when you are ready. |
| All times are GMT +2. The time now is 19:03. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.