So I can set up virutal hosts for each web site. The web sites are only going to be intranet sites, does that matter? For testing, how can I cannect to one of the web sites on the server without putting the ip address in the host file?
I gave it a quick try and I could get two separate sites up locally by using the machine name for the first and the network ip for the second. My conf looked like this:
<VirtualHost *>
ServerName anyname
The rest of the directive
</VirtualHost>
<VirtualHost *>
ServerName machinename
The rest of the directive
</VirtualHost>
Only hitch I had was interaction between SSL and Virtual Host. Had to disable SSL to get it to work. Right now I have 8 sites served from a single IP, using virtual hosting. Works great.
Also, you can put in multiple Virtual Host entries pointing to the same website directory, so that XYZ.COM and XYZ.NET are physically the same pages on the server.
Me? It's internet, using dyndns.org DNS, Linksys NAT router with port 20 forwarded to linux RH8 box. Can also see it on the intranet, but only if entries are in HOSTS file on local machine.
As you can probably tell, I don't really know what I am doing with Apache. I have only ever set up IIS and now I have been thrown in the deep end. I need to set up three web sites on Apache and configure it so that the user just have to type in "weba" into their browser to get web site a. So all I need to do is map weba to the ip address of the web server and setup a virtualhost in Apache? One question with the DocumentRoot - in the examples it has /
I think to set up more than two virtual hosts you may need to add a nic and use the ip address in the virtualhost directive to resolve it. If you figure out another way, post it, there are bound to be some others interested.
The document root can be anything you like as you can see in my first post. The default depends on the package you used to install apache, so if your site resolves to the default apache page you can look at you httpd.conf and determine its location. The directory /
usually has the apache documentation and it is generally an alias. If you have not made any changes the entry below will show you the root. If you have a virtual host entry, then the first virtual host becomes the default server and root directory.
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/phpdev/
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.