![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| S-118: Apache httpd Vulnerabilities | iBot | Security Advisories (RSS) | 0 | 01-15-2008 08:10 PM |
| Python & httpd.conf settings | thumper | UNIX for Dummies Questions & Answers | 0 | 12-12-2007 11:43 AM |
| Apache 2 httpd.conf empty | sspirito | Ubuntu | 2 | 08-06-2007 11:09 AM |
| httpd.conf - stumped | Cameron | IP Networking | 2 | 04-25-2002 05:31 AM |
| defaults httpd.conf | macdonto | IP Networking | 5 | 09-25-2001 05:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Apache httpd.conf <VirtualHost> issue
I have just configured httpd.conf on a new Redhat 9 install. Below are my additions to httpd.conf. Everything works fine except that when typing http://spetnik.d2g.com into my web browser, I am sent to the "Default catch all" site. Any clues?
Code:
NameVirtualHost *:80
#Default catch all
<VirtualHost *:80>
ServerAdmin aspetner@spetnik.com
DocumentRoot /var/www/html/
ErrorDocument 404 /errors/notfound.html
</VirtualHost>
#spetnik.d2g.com
<VirtualHost *:80>
ServerName spetnik.d2g.com
ServerAlias spetnik.d2g.com www.spetnik.d2g.com
ServerAdmin aspetner@spetnik.com
DocumentRoot /var/www/spetnik/html/
ErrorDocument 404 /errors/notfound.html
TransferLog logs/spetnik
<Directory /var/www/spetnik/html>
AllowOverride All
</Directory>
</VirtualHost>
#e-feedback.org
<VirtualHost *:80>
ServerName e-feedback.org
ServerAlias e-feedback.org www.e-feedback.org
ServerAdmin e-feedback@spetnik.com
DocumentRoot /var/www/e-feedback/html
ErrorDocument 404 /errors/notfound.html
TransferLog logs/e-feedback
<Directory /var/www/e-feedback/html>
AllowOverride All
</Directory>
</VirtualHost>
Aaron |
|
||||
|
I don't think you understand. Both e-feedback.org and www.e-feedback.org display the index.html file from /var/www/e-feedback/html. www.spetnik.d2g.com also displays /var/www/spetnik/html/index.html, but if I take out the www (just spetnik.d2g.com), I get the catch all directory (/var/www/html).
|
|
|||||
|
Now I see what you're saying..
Looking at the documentation, I can't figure out what's wrong, but I'm sure someone else will know. |
|
|||||
|
In your first virtual host, you specify your domain as spetnik.d2g.com. I don't have a way to test this, but to my way of thinking, this would be a host.domain.com. (Your other one works because it is has only a domain - e-feedback.org )
<VirtualHost *:80> ServerName spetnik.d2g.com ServerAlias spetnik.d2g.com www.spetnik.d2g.com ServerAdmin aspetner@spetnik.com DocumentRoot /var/www/spetnik/html/ Part of the documentation states: Quote:
Quote:
|
|
||||
|
Nevermind, I figured it out. I had "ServerName spetnik.d2g.com:80" set at the top of my httpd.conf file. I changed it to "ServerName linuxsrv:80" (linuxsrv is the machine name) and it now works fine.
Thanx for the help anyway . |
| Sponsored Links | ||
|
|