Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st July 2005, 01:29 AM
pushback Offline
Registered User
 
Join Date: Jun 2005
Location: Bay Area, California
Posts: 167
FC4, Apache 2.0. Virtual host not working

Hi,

I am trying to set up a virtual host on my server. I believe I have done everything correctly ... but ...

Here's the entries in httpd.conf


NameVirtualHost 123.123.123.123

<VirtualHost 123.123.123.123>
ServerName 123.123.123.123
DocumentRoot /var/www/html
ErrorLog /var/log/httpd/error__log
CustomLog /var/log/httpd/access_log combined
</VirtualHost>

<VirtualHost 123.123.123.123>
ServerName mydomain.com
DocumentRoot /var/www/html/mydomain
ErrorLog /var/log/httpd/error_mydomain_log
CustomLog /var/log/httpd/access_mydomain_log combined
</VirtualHost>

<VirtualHost 123.123.123.123>
ServerName www.mydomain.com
DocumentRoot /var/www/html/mydomain
ErrorLog /var/log/httpd/error_mydomain_log
CustomLog /var/log/httpd/access_mydomain_log combined
</VirtualHost>

httpd seems fine with it as when I check it I get this:

apollo.fourkings.com[root]:/var/log/httpd-> httpd -S
VirtualHost configuration:
123.123.123.123* is a NameVirtualHost
default server 123.123.123.123 (/etc/httpd/conf/httpd.conf:976)
port * namevhost 123.123.123.123 (/etc/httpd/conf/httpd.conf:976)
port * namevhost mydomain.com (/etc/httpd/conf/httpd.conf:983)
port * namevhost www.mydomain.com (/etc/httpd/conf/httpd.conf:990)
wildcard NameVirtualHosts and _default_ servers:
_default_:443 localhost.localdomain (/etc/httpd/conf.d/ssl.conf:86)
Syntax OK

and I have created in index.html in /var/www/html/mydomain

But .... when I access the site via browser on http://www.mydomain.com, I get the Fedora Core page. Also, nothing goes into the new log files (that the server created), rather the entries go into access_log.

-rw-r--r-- 1 root root 0 Jun 30 17:06 access_mydomain_log
-rw-r--r-- 1 root root 6502280 Jun 30 17:29 access_log
-rw-r--r-- 1 root root 8081 Jun 25 03:09 access_log.1
-rw-r--r-- 1 root root 1966 Jun 19 02:27 access_log.2
-rw-r--r-- 1 root root 0 Jun 30 17:06 error_mydomain_log
-rw-r--r-- 1 root root 2721215 Jun 30 17:29 error_log
-rw-r--r-- 1 root root 0 Jun 30 17:06 error__log
-rw-r--r-- 1 root root 5151 Jun 26 04:02 error_log.1
-rw-r--r-- 1 root root 2316 Jun 19 04:02 error_log.2


Oh--one other thing. The actual IP on the NIC is 192.168.100.3. the 123.123.123.123 IP is on the other side of a linksys router that is forwarding port 80 to 192.168.100.3.


Thanks in advance if you have any ideas.

Last edited by pushback; 1st July 2005 at 01:32 AM.
Reply With Quote
  #2  
Old 1st July 2005, 01:34 AM
pushback Offline
Registered User
 
Join Date: Jun 2005
Location: Bay Area, California
Posts: 167
Nevermind--I figured it out. The virtual host definitions actually have to use the NIC IP address, not the Internet IP address. Works now.
Reply With Quote
Reply

Tags
apache, fc4, host, virtual, working

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache virtual host problem reeksy Using Fedora 5 26th May 2008 12:54 AM
apache help, virtual host golpemortal Servers & Networking 1 8th June 2007 07:55 AM
Apache Virtual Host User mattbrown Servers & Networking 5 8th May 2006 08:49 PM
Virtual host problem in apache Fear Servers & Networking 7 24th November 2005 08:54 AM


Current GMT-time: 21:19 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat