httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Kurth <rdku...@starband.net>
Subject Re: [users@httpd] Problem using Include directive and NameVirtualHost
Date Mon, 08 Sep 2003 17:15:46 GMT
I am using version 1.3.27.
I am doing NamedBased hosting so each record will have NameVirtualHost 
in it with the same IP. But the problem even happens when there is only 
one record apache will not start and it does not say way.

Leif W wrote:

> 
> Which version of Apache are you using?  Since I see a Port directive, I am
> assuming 1.3.x and not 2.0.x, otherwise you'd use a Listen directive
> instead.  Other than that, are you certain that you're using NameVirtualHost
> only once per IP?  Elsewise, I'm not sure what the problem could be.  I'm
> going to try setting up vhosts similarly on my home box, and if learn
> anything I'll post again.
> 
> Leif
> 
> ----- Original Message ----- 
> From: "Richard Kurth" <rdkurth@starband.net>
> To: <users@httpd.apache.org>
> Sent: Monday, September 08, 2003 3:30 AM
> Subject: [users@httpd] Problem using Include directive and NameVirtualHost
> 
> 
> 
>>I am trying to use the Include to point to a directory where I have all
>>my VirtualHost directive each one in a separate file named for it's
>>domain name. They are all stored in a directory off of the
>>/etc/httpd/conf directory called vhosts.
>>In my httpd.conf file I am pointing to this directory with
>>Include /etc/httpd/conf/vhosts/
>>So it should read every file that is in that directory
>>
>>A VirtualHost file will look like this example
>># owned by VirtualHost
>>NameVirtualHost 192.168.0.100
>>
>># FrontPage needs the following four things to be here
>># otherwise all the vhosts need to go in httpd.conf, which could
>># get very large since there could be thousands of vhosts
>>Port 80
>>ServerRoot /etc/httpd
>>ResourceConfig /etc/httpd/conf/srm.conf
>>AccessConfig /etc/httpd/conf/access.conf
>>
>><VirtualHost 192.168.0.100>
>>ServerName www.directphp.net
>>ServerAdmin admin
>>DocumentRoot /home/sites/home/web/
>>ServerAlias directphp.net www.directphp.net
>>ErrorDocument 401 /error/401-authorization.html
>>ErrorDocument 403 /error/403-forbidden.html
>>ErrorDocument 404 /error/404-file-not-found.html
>>ErrorDocument 500 /error/500-internal-server-error.html
>>RewriteEngine on
>>RewriteCond %{HTTP_HOST}                !^192.168.0.100(:80)?$
>>RewriteCond %{HTTP_HOST}                !^www.directphp.net(:80)?$ [NC]
>>RewriteRule ^/(.*)                      http://www.directphp.net/$1 [L,R]
>>RewriteOptions inherit
>>AliasMatch ^/~([^/]+)(/(.*))?       /home/sites/home/users/$1/web/$3
>># BEGIN WebScripting SECTION.  DO NOT EDIT MARKS OR IN BETWEEN.
>>ScriptAlias  /cgi-bin/  /home/sites/home/web/cgi-bin
>>AddHandler server-parsed .shtml
>>AddType application/x-httpd-php .php4
>># END WebScripting SECTION.  DO NOT EDIT MARKS OR IN BETWEEN.
>></VirtualHost>
>>
>>My problem is that this will work if there is only one site in the
>>directory if there is more than one with the same IP number it will not
>>restart the apache server.
>>This is what it says with just two files in the directory
>>
>>[root@directphp conf]# /etc/rc.d/init.d/httpd start
>>Processing config directory: /etc/httpd/conf/vhosts/
>>  Processing config file: /etc/httpd/conf/vhosts/www.directphp.net
>>  Processing config file: /etc/httpd/conf/vhosts/www.testcompany1.com
>>[Mon Sep  8 00:32:51 2003] [warn] NameVirtualHost 192.168.0.100:80 has
>>no VirtualHosts
>>/etc/rc.d/init.d/httpd start: httpd started
>>
>>But it is not started if I take the
>>Include /etc/httpd/conf/vhosts/
>>out of the httpd.conf file apache will start
>>Can somebody please let me know way this is happening I really do not
>>what to put all the VirtualHost Directives in the httpd.conf file it
>>will get to large
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 


---------------------------------------------------------------------
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


Mime
View raw message