Unix/Linux Go Back    

Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

Apache question - virtual host related

Red Hat

apache, apache config, apache virtual host, apache2, virtual host

Thread Tools Search this Thread Display Modes
Old Unix and Linux 03-31-2013   -   Original Discussion by freebird8z
freebird8z's Unix or Linux Image
freebird8z freebird8z is offline
Registered User
Join Date: Mar 2013
Last Activity: 18 April 2013, 10:49 AM EDT
Posts: 14
Thanks: 0
Thanked 2 Times in 2 Posts
Apache question - virtual host related

Hi folks,

I recently read about Apache virtual host and was able to configure that as well. I used name based virtual host (lets say http://vhost1.example.com) and it worked just fine. Then I configured another named based virtual host on same apache server (lets say http://vhost2.example.com) and that worked too (ONLY after disabling first one i.e. vhost1). Otherwise it was showing homepage of first virtual host, if I dont disable the first virtual server.

My initial understanding says that there can be multiple active virtual hosts (name based) - but that doesn't seem to be the case. I know and learnt about precedence also and according to that first virtual web server will be default webserver.

My quesion is - how to enable all name based virtual hosts & is that even possible? If yes, could someone please provide a same config?

Sponsored Links
Old Unix and Linux 03-31-2013   -   Original Discussion by freebird8z
Corona688's Unix or Linux Image
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
Join Date: Aug 2005
Last Activity: 23 May 2018, 6:42 PM EDT
Location: Saskatchewan
Posts: 22,677
Thanks: 1,178
Thanked 4,324 Times in 3,987 Posts
You will have to be more specific about what you've done and in what ways it is and isn't working.
Sponsored Links
Old Unix and Linux 04-02-2013   -   Original Discussion by freebird8z
thmnetwork's Unix or Linux Image
thmnetwork thmnetwork is offline
Registered User
Join Date: Mar 2004
Last Activity: 27 February 2018, 11:16 AM EST
Posts: 144
Thanks: 13
Thanked 6 Times in 6 Posts
Posting your httpd.conf would be good (along with any additional .conf's apache has been configured to pull in).

From the symptoms it sounds like you might not have uncommented the "NameVirtualHost *:80" line but we can't tell for sure. If you don't have "NameVirtualHost" configured, apache httpd will default to IP-based VHosts and just resolve DNS names to get the IP.

I'd check that and if you're still having issues put your configuration files up on dpaste.org (censoring sensitive things like passwords and usernames) so we can review.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Change hostID of Solaris 10 virtual/guest machine installed by Virtual Box 4.1.12 on Windows-XP host Matt_VB Solaris 4 04-29-2012 11:56 AM
Virtual Host Apache Duffs22 Red Hat 2 07-13-2011 06:34 AM
Unix virtual host detection Meridian Solaris 1 01-14-2004 09:13 PM
Apache virtual host 98_1LE UNIX for Dummies Questions & Answers 4 12-11-2001 05:23 PM

All times are GMT -4. The time now is 02:19 AM.