NYCPHP Meetup

NYPHP.org

[nycphp-talk] Apache config question

Jeff jsiegel1 at optonline.net
Sat Sep 6 07:35:49 EDT 2003


I'm not sure how to handle this. I'm setting up a new server at the
office. I'd like to be able to set up a directory structure like this:

	/var/www/html/clientproj1  <= for client stuff
	/var/www/html/myproj <= for whatever other project I may work on

I started effing around with virtual host (see below) which works fine
for this one instance but it's not obvious how to set up another virtual
host since I really don't have "names" for each one. I access everything
using the IP address.

This works!
<VirtualHost 192.168.1.111>
	DocumentRoot /var/www/html/clientproj1  
	ServerName www.clientproj1.com
</VirtualHost>

This DOESN'T work if combined with above. The two "overlap" according to
Apache's configtest.
<VirtualHost 192.168.1.111>
	DocumentRoot /var/www/html/myproj
	ServerName www.myproj.com
</VirtualHost>

I think the answer is buried somewhere in here
(http://httpd.apache.org/docs-2.1/vhosts/examples.html) but after trying
a few different things, e.g., 192.168.1.111:8080, I couldn't get it to
work with another subdir like "myproj." Suggestions?

Jeff




More information about the talk mailing list