LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-21-2005, 08:48 PM   #1
kuplo
Member
 
Registered: Oct 2005
Posts: 123

Rep: Reputation: 15
whats wrong with my http.conf and virtual hosts


### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80


# Where do we put the lock and pif files?
LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"

# Defaults for virtual hosts
# Logs
#
# Virtual hosts
#

# Virtual host thriftyserve.com
<VirtualHost *:80>
DocumentRoot /var/www/html/thriftyserve_com
ServerName thriftyserve.com
ServerAdmin thriftyserve@hotmail.com
DirectoryIndex index.html index.htm index.shtml
</VirtualHost>

# Virtual host iphotohost.com
<VirtualHost *:80>
DocumentRoot /var/www/html/iphotohost_com
ServerAdmin thriftyserve@hotmail.com
ServerName iphotohost.com
DirectoryIndex index.html index.htm index.shtml
</VirtualHost>

# Virtual host imaginativefinishes.com
<VirtualHost *:80>
DocumentRoot /var/www/html/imagininativefinishes_com
ServerAdmin imaginativefinishes@hotmail.com
ServerName imaginativefinishes.com
DirectoryIndex index.html index.htm index.shtml
</VirtualHost>

# Virtual host brainboxdesigns.com
<VirtualHost *:80>
DocumentRoot /var/www/html/brainboxdesigns_com
ServerAdmin thriftyserve@hotmail.com
ServerName brainboxdesigns.com
DirectoryIndex index.html index.htm index.shtml
</VirtualHost>

# Virtual host myppcsoftware.com
<VirtualHost *:80>
DocumentRoot /var/www/html/myppcsoftware
ServerAdmin myppcsoftware@mail.com
ServerName myppcsoftware.com
DirectoryIndex index.html index.htm index.shtml
</VirtualHost>



#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

<Directory "/">
Options FollowSymLinks

AllowOverride None



</Directory>

<Directory "/var/www/html">
Options Indexes Includes FollowSymLinks

AllowOverride None
Allow from all


Order allow,deny
</Directory>

<Directory "/var/www/icons">
Options Indexes MultiViews

AllowOverride None
Allow from all


Order allow,deny
</Directory>

<Directory "/var/www/cgi-bin">
Options ExecCGI

AllowOverride None
Allow from all


Order allow,deny
</Directory>





It will only bring up the first domain listed and thats all, what have I done wrong?
IM running Fedora 4
 
Old 11-22-2005, 12:26 AM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
The problem may go away if you include ServerAlias for each virtual host like this:

ServerName iphotohost.com
ServerAlias www.iphotohost.com
ServerAlias *.iphotohost.com

The first virtual host is the catch-all if no other matches are found. You don't even need a ServerName for the first entry.

As originally written, only a call for iphotohost.com would match the second virtual host entry. So if the call was for www.iphotohost.com, then there would be no match and it would default to the first entry, thriftyserve.com.

I think you only really need the *.iphotohost.com entry, but the www... entry is usually included, plus anything that you know will be used.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
virtual hosts, virtual ip's? kuplo Linux - Newbie 3 11-29-2005 08:44 PM
/etc/hosts, /etc/resolve.conf and /etc/host.conf config probs below_average Linux - Networking 1 12-08-2004 10:07 PM
Yum Errors in parsing, whats wrong here (yum.conf pasted) thejokker Linux - Newbie 1 06-15-2004 02:28 AM
Virtual Hosts - whats wrong Cynthia Blue Linux - Newbie 8 01-07-2003 09:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration