httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Swift" <steve.j.sw...@gmail.com>
Subject Re: [users@httpd] Virtual Host container not being read..
Date Thu, 05 Oct 2006 10:50:57 GMT
I've always been told that the reference inside the <VirtualHost xxx>
directive must match exactly what you specified on the NameVirtualHost
directive, but you have <VirtualHost righton.ath.cx:80><http://righton.ath.cx/>
What's on your NameVirtualHost directive?

On 05/10/06, Jaqui Greenlees <jaqui_greenlees@yahoo.ca> wrote:
>
> Below is a discussion I had on a forum site with a
> member having vhost issues.
> We cleared the error messages from apachectl
> start/restart.
>
> but now it seems that apache is not reading the vhost
> definitions at all.
> does anyone have any idea why this would be?
> [ yes, I did get it checked for proper locationfor the
> particular installation, that was my first thought. ]
>
> There isn't a rush, the person involved hasn't
> responded with any further information in a week, more
> it's just for my own education. :)
>
> Jaqui
>
>
> Hello, I've been struggling with this for weeks and
> haven't been able to get it working. Here's how it
> works:
>
> I have a friend who has a Ubuntu webserver running at
> http://brutongarden.org. Due to the instability of my
> website RightOnThruHere running on Dhost, I decided
> I'd try to move my site over to brutongarden. It's up
> to me to setup the virtual hosts.
>
> Here's what I've placed in
> /etc/apache2/sites-enabled/default:
> Code:
>
> <VirtualHost righton.ath.cx:80>
>         ServerAdmin blah@blah.nothing
>
>         ServerName righton.ath.cx
>         ServerAlias righton.ath.cx *.righton.ath.cx
> rightonthruhere.ath.cx *.rightonthruhere.ath.cx
>         DocumentRoot /var/www/righton/
>         <Directory />
>                 Options FollowSymLinks
>                 AllowOverride None
>         </Directory>
>         <Directory /var/www/righton>
>                 Options Indexes FollowSymLinks
> MultiViews
>                 AllowOverride None
>                 Order allow,deny
>                 allow from all
>                 # This directive allows us to have
> apache2's default start page
>                 # in /apache2-default/, but still have
> / go to the right place
>                 # Commented out for Ubuntu
>                 #RedirectMatch ^/$ /apache2-default/
>         </Directory>
>
>         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>         <Directory "/usr/lib/cgi-bin">
>                 AllowOverride None
>                 Options ExecCGI -MultiViews
> +SymLinksIfOwnerMatch
>                 Order allow,deny
>                 Allow from all
>         </Directory>
>
>         ErrorLog /var/log/apache2/error.log
>
>         # Possible values include: debug, info,
> notice, warn, error, crit,
>
>         # alert, emerg.
>        <Directory /var/www/righton>
>                 Options Indexes FollowSymLinks
> MultiViews
>                 AllowOverride None
>                 Order allow,deny
>                 allow from all
>                 # This directive allows us to have
> apache2's default start page
>                 # in /apache2-default/, but still have
> / go to the right place
>                 # Commented out for Ubuntu
>                 #RedirectMatch ^/$ /apache2-default/
>         </Directory>
>
>         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>         <Directory "/usr/lib/cgi-bin">
>                 AllowOverride None
>                 Options ExecCGI -MultiViews
> +SymLinksIfOwnerMatch
>                 Order allow,deny
>                 Allow from all
>         </Directory>
>
>         ErrorLog /var/log/apache2/error.log
>
>         # Possible values include: debug, info,
> notice, warn, error, crit,
>         # alert, emerg.
>         LogLevel warn
>
>         CustomLog /var/log/apache2/access.log combined
>         ServerSignature Off
>
>     Alias /doc/ "/usr/share/doc/"
>     <Directory "/usr/share/doc/">
>         Options Indexes MultiViews FollowSymLinks
>         AllowOverride None
>         Order deny,allow
>         Deny from all
>         Allow from 127.0.0.0/255.0.0.0 ::1/128
>     </Directory>
>
> </VirtualHost>
>
> The same entry is also present in
> /etc/apache2/sites-available/default. In httpd.conf, I
> have the following entry:
> Code:
>
> <VirtualHost *:80>
> ServerName righton.ath.cx
> ServerAlias righton.ath.cx *.righton.ath.cx
> rightonthruhere.ath.cx
> DocumentRoot /var/www/righton/
> </VirtualHost>
>
> But no matter how many times the webserver is
> rebooted,
> http://righton.ath.cx
> always goes to http://brutongarden.org, instead of my
> mirrored Right On Thru Here.
>
> Is there something I've done wrong, or another file
> that still needs editing?
> __________________
>
> According to the default apache config file [ apache 2
> ]:
> Code:
>
> ### 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
> #Setenv VLOG
>
> #
> # VirtualHost example:
> # Almost any Apache directive may go into a
> VirtualHost container.
> # The first VirtualHost section is used for requests
> without a known
> # server name.
> #
> #<VirtualHost *:80>
> #    ServerAdmin webmaster@dummy-host.example.com
> #    DocumentRoot /www/docs/dummy-host.example.com
> #    ServerName dummy-host.example.com
> #    ErrorLog
> /var/log/httpd/dummy-host.example.com-error_log
> #    CustomLog
> /var/log/httpd/dummy-host.example.com-access_log
> common
> #</VirtualHost>
>
>
> ################################################################################
> # virtual hosts configuration section
> # Include virtual hosts, if any
> Include conf/vhosts.d/*.conf
>
>
> what this doesn't mention is that if you require ssl
> for your sites, you need to use ip based hosting, not
> name based.
> you cannot define multiple virtual hosts on one line,
> each host must be declared in it's own virtualhost
> container.
> the vh configuration location may be
> /etc/httpd/conf/vhosts.d/ so it might not be reading
> the configuration file.
> __________________
>
>
> Thanks for the help, but there is no line that loads
> conf/vhosts.d/*.conf. In the virtual hosts section, it
> reads the following:
> Code:
>
> Include sites-enabled/*
>
> I tried moving the virtual host section into a
> separate file in sites-available, and then sym-linking
> it from sites-enabled. I then got the following error
> when I restarted Apache:
> Code:
>
> [Sun Sep 24 15:14:33 2006] [warn] The ScriptAlias
> directive in /etc/apache2/sites-enabled/righton at
> line 46 will probably never match because it overlaps
> an earlier ScriptAlias.
>
> So at least it's trying to load it, but I don't know
> what to do now. I tried commenting out the entry I had
> previously in httpd.conf, but that didn't help.
> __________________
>
> Why do you have the following defined twice?
> both directory settings blocks below are duplicated in
> your vh container.
> that is needlessly complex, making it harder to see
> what could be wrong, if not the cause of the issues.
> Code:
>
>        <Directory /var/www/righton>
>                 Options Indexes FollowSymLinks
> MultiViews
>                 AllowOverride None
>                 Order allow,deny
>                 allow from all
>                 # This directive allows us to have
> apache2's default start page
>                 # in /apache2-default/, but still have
> / go to the right place
>                 # Commented out for Ubuntu
>                 #RedirectMatch ^/$ /apache2-default/
>         </Directory>
>
>         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>         <Directory "/usr/lib/cgi-bin">
>                 AllowOverride None
>                 Options ExecCGI -MultiViews
> +SymLinksIfOwnerMatch
>                 Order allow,deny
>                 Allow from all
>         </Directory>
>
> __________________
>
> Quote:
> Originally Posted by Jaqui
> Why do you have the following defined twice?
> both directory settings blocks below are duplicated in
> your vh container.
> that is needlessly complex, making it harder to see
> what could be wrong, if not the cause of the issues.
> Please forgive me! I'm still waking up.
> The errors went away, but it still doesn't work
> http://righton.ath.cx
>
> Jeff Henager: "If the average user can put a CD in and boot the system and
> follow the prompts, he can install and use Linux. If he can't do that simple
> task, he doesn't need to be around technology."
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Steve Swift
http://www.swiftys.org.uk

Mime
View raw message