Hey Everyone!,
I've tried looking at all the documentation I can find, I've editted and re-editted my config file over and over again, I've double checked the paths over and over.... I'm at a loss. So... let me tell the things that I know and if anyone can spot a glaring error for me, I would be VERY thankful!
This is on an RH9 box; the name of the box is "deacon". If I set things up with no virtual hosts, everything is beautiful and works fine. All my normal html files are in or in directories under /var/www/html. If I set it up with virtual hosts, the main page still works but If I try to get to one of the virtual hosts I get the "Test Page for the Apache Web Server on Red Hat Linux" and that's all I can get.
I setup a different partion mounted as /share where I hope to put a number of different webpages, each with virtual domains and also ftp folders for those domains (different subject). Under the share folder I made a folder named "web" and under that I made folders "vh1" , "vh2" and "vh3" to test the setup and usage of the virtual hosts (thus vh1, vh2 ...etc). I made a web page (index.html) for each one that just has VH1.MYDOMAIN.COM or VH2...etc so that I can tell if I'm resolving to the right directory on the server.
I have updated my DNS entries for the one domain I have (which I'll refer to as "mydomain") and all of them resolve to the single IP address just fine. The subdomains that I'm practicing with are:
deacon.mydomain.com
vh1.mydomain.com
vh2.mydomain.com
vh3.mydomain.com
Here are excerpts from my httpd.conf file... I've only been trying to set up vh1 so far:
Listen *:80
User apache
Group apache
ServerName deacon.mydomain.com
UseCanonicalName off
DocumentRoot "/var/www/html"
NameVirtualHost *:80
<VirtualHost *:80>
ServerName deacon.mydomain.com
ServerAlias *.deacon.mydomain.com
DocumentRoot /var/www/html
ServerAdmin postmaster@mydomain.com
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel debug
HostNameLookups on
</VirtualHost>
<VirtualHost *:80>
ServerName vh1.mydomain.com
ServerAlias *.vh1.mydomain.com
DocumentRoot /share/web/vh1
ServerAdmin postmaster@mydomain.com
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel debug
HostNameLookups on
</VirtualHost>
The reason I designate *:80 is that SSL appears to be running and if I just put "*" by itself I get SSL error pages when I browse. BTW... how does one turn ssl off?
TO ANYONE WHO HAS READ THIS FAR
Thank you! Just reading through all that is a chore and I appreciate your efforts whether you can help me or not!
Joe
I've tried looking at all the documentation I can find, I've editted and re-editted my config file over and over again, I've double checked the paths over and over.... I'm at a loss. So... let me tell the things that I know and if anyone can spot a glaring error for me, I would be VERY thankful!
This is on an RH9 box; the name of the box is "deacon". If I set things up with no virtual hosts, everything is beautiful and works fine. All my normal html files are in or in directories under /var/www/html. If I set it up with virtual hosts, the main page still works but If I try to get to one of the virtual hosts I get the "Test Page for the Apache Web Server on Red Hat Linux" and that's all I can get.
I setup a different partion mounted as /share where I hope to put a number of different webpages, each with virtual domains and also ftp folders for those domains (different subject). Under the share folder I made a folder named "web" and under that I made folders "vh1" , "vh2" and "vh3" to test the setup and usage of the virtual hosts (thus vh1, vh2 ...etc). I made a web page (index.html) for each one that just has VH1.MYDOMAIN.COM or VH2...etc so that I can tell if I'm resolving to the right directory on the server.
I have updated my DNS entries for the one domain I have (which I'll refer to as "mydomain") and all of them resolve to the single IP address just fine. The subdomains that I'm practicing with are:
deacon.mydomain.com
vh1.mydomain.com
vh2.mydomain.com
vh3.mydomain.com
Here are excerpts from my httpd.conf file... I've only been trying to set up vh1 so far:
Listen *:80
User apache
Group apache
ServerName deacon.mydomain.com
UseCanonicalName off
DocumentRoot "/var/www/html"
NameVirtualHost *:80
<VirtualHost *:80>
ServerName deacon.mydomain.com
ServerAlias *.deacon.mydomain.com
DocumentRoot /var/www/html
ServerAdmin postmaster@mydomain.com
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel debug
HostNameLookups on
</VirtualHost>
<VirtualHost *:80>
ServerName vh1.mydomain.com
ServerAlias *.vh1.mydomain.com
DocumentRoot /share/web/vh1
ServerAdmin postmaster@mydomain.com
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel debug
HostNameLookups on
</VirtualHost>
The reason I designate *:80 is that SSL appears to be running and if I just put "*" by itself I get SSL error pages when I browse. BTW... how does one turn ssl off?
TO ANYONE WHO HAS READ THIS FAR
Thank you! Just reading through all that is a chore and I appreciate your efforts whether you can help me or not!
Joe