Forum Moderators: phranque
Here's my /etc/hosts file:
127.0.0.1 localhost.localdomain localhost
69.***.252.166 test.example.com
Here's my httpd.conf file:
Listen 69.***.252.166:80
Listen 127.0.0.1:80
ServerName test.example.com
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
ServerAlias test.example.com
DocumentRoot /var/www/html
</VirtualHost>
<VirtualHost *:80>
ServerName test.example_bs.com
DocumentRoot /var/www/html/example_bs
</VirtualHost>
I really need to get this working today. Your help is greatly appreciated!
[edited by: jdMorgan at 11:19 pm (utc) on Jan. 24, 2005]
[edit reason] No personal URLs/domains, please. [/edit]
Listen 69.***.252.166:80
Listen 127.0.0.1:80
#ServerName test.example.com <--commented on purpose
NameVirtualHost 69.***.252.166
<VirtualHost test.example.com>
ServerName test.example.com
ServerAlias 69.***.252.166
ServerAlias localhost
DocumentRoot /var/www/html
ErrorLog /var/log/test.example.com-error_log
CustomLog /var/log/test.example.com-access_log combined
</VirtualHost>
<VirtualHost test.example_bs.com>
ServerName test.example_bs.com
DocumentRoot /var/www/html/example_bs
ErrorLog /var/log/test.example_bs.com-error_log
CustomLog /var/log/test.example_bs-access_log combined
</VirtualHost>
The following configuration will also create vhost specific access and error logs unique to each domain for debugging purposes. Omit those to use the default access_log and error_log specified in your httpd.conf.
After making changes to httpd.conf, use the command 'apachectl configtest' before restarting the webserver. The output of errors should guide you to the problems, if all is ok then you will see 'Syntax OK'.
~MF
[edited by: jdMorgan at 11:22 pm (utc) on Jan. 24, 2005]
[edit reason] Obscured specifics per TOS. [/edit]