[thelist] Apache: Name base VirtualHost Hel[L]p?
jsWalter
jsWalter at torres.ws
Wed Feb 18 09:22:48 CST 2004
I have 16 virtual hosts running on my 2k box.
This is off my 2k Apache 2 conf files...
G:\etc\httpd\conf\httpd.conf
httpd.conf: (only relavent parts)
ServerName 192.168.1.10:80
DocumentRoot "/etc/httpd/htdocs"
#NameVirtualHost *
# Include other conf files, any and all.
# this will open ONLY .conf files!
include conf.d/*.conf
random virtual host file...
G:\etc\httpd\conf.d\apache.test.conf
<VirtualHost apache.test:80>
ServerName apache.test:80
ServerAlias apache.test
ServerAdmin walter at torres.ws
DocumentRoot /etc/httpd/htdocs
ScriptAlias /cgi-bin /etc/httpd/httpd/cgi-bin
ErrorLog /etc/httpd/logs/web_error.log
TransferLog /etc/httpd/logs/web_access.log
ScriptLog /etc/httpd/logs/script_access.log
# We are not using encryption here
SSLEngine off
</VirtualHost>
another VH file...
G:\etc\httpd\conf.d\php.test.conf
#################################################
# php.test
<VirtualHost php.test:80>
ServerName php.test:80
ServerAdmin walter at php.test
ServerAlias *.php.test
DocumentRoot /home/php/htdocs
ScriptAlias /cgi-bin /home/php/httpd/cgi-bin
ErrorLog /home/php/httpd/log/web_error.log
TransferLog /home/php/httpd/log/web_access.log
ScriptLog /home/php/httpd/log/script_access.log
</VirtualHost>
======
And yes this works, even without the drive letter.
Since my Apache, PHP, perl and mySQL are all on G volume, the drive letter
is redundant.
This lets me create a faux-unix volume on my 2k box to match what is on my
Linux box at "work".
With this method, I can create a virtual host locally, test it out, and then
FTP the conf files and the actual domain files (PHP, perl, html, etc) right
to my Linux box without any changes.
I have a piece that describes how I set up my system to do this...
http://torres.ws/dev/php/
Hope this helps.
walter
More information about the thelist
mailing list