You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Adon Cook <ad...@barrodale.com> on 2002/06/04 21:23:39 UTC

virtual host apache 2.0.35

Hi.  I have read the documentation for setting up vitual host but cannot do 
it.  I have basically copied what it says in the docs but have 
problems.  First a couple questions:
1. Where should the <virtualhost > entry go in the httpd.conf file?  In the 
beginning, or end?  does it matter?
2. Since i am using virtual host do i need to ONLY have this entry in the 
httpd.conf file?  I ask this because there ends up being duplication for 
entries such as ErrorLog and DocumentRoot.
3. I am skeptical as to how this works.  I have one IP address, but want a 
subdomain.  I even set up my regularly used address to use port 80 and the 
secondary (ie, subdomain) to use another port.  Is this enough?

The strange thing is when i have made the changes to my httpd.conf file i 
CAN gracefully restart it.  But then a second later the httpd deamon is not 
running.  I do a apachectl status and it says it is not running and that it 
cannot access the http://localhost:server-status.  If i try to manually 
start it again it says that i cannot.

What am i doing wrong?

-adon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: virtual host apache 2.0.35

Posted by Lee Fellows <lf...@4lane.com>.
> > running.  I do a apachectl status and it says it is not running and that
> it
> > cannot access the http://localhost:server-status.  If i try to manually
> > start it again it says that i cannot.
> >
> > What am i doing wrong?


What does it say in your error_log?  
http://localhost:server-status is not the url you were using to try and
connect, is it?  
What does it show you when you do a 'ps aux | grep http'?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: virtual host apache 2.0.35

Posted by Daniel Gaddy <dg...@sparctech.com>.
> 1. Where should the <virtualhost > entry go in the httpd.conf file?  In
the
> beginning, or end?  does it matter?
It should go at the end, where you see the examples of a virtualhost
directive.

> 2. Since i am using virtual host do i need to ONLY have this entry in the
> httpd.conf file?  I ask this because there ends up being duplication for
> entries such as ErrorLog and DocumentRoot
Yes, though you have not mentioned the namevirtualhost directive.  This is
an example of what you need:

NameVirtualHost 1.2.3.4

<VirtualHost 1.2.3.4>
    ServerAdmin me@domain.com
    DocumentRoot DIRECTORY_THAT_WEB_IS_IN
    ServerName www.domain.com
    ServerAlias domain.com
    </VirtualHost>

<VirtualHost 1.2.3.4>
    ServerAdmin me@domain.com
    DocumentRoot DIRECTORY_THAT_WEB2_IS_IN
    ServerName www.domain2.com
    ServerAlias domain2.com
    </VirtualHost>

ETC...

> 3. I am skeptical as to how this works.  I have one IP address, but want a
> subdomain.  I even set up my regularly used address to use port 80 and the
> secondary (ie, subdomain) to use another port.  Is this enough?
You dont even have to have it use another port... Its not necessary, though
you can.  Just doing what I said above will work fine.

> The strange thing is when i have made the changes to my httpd.conf file i
> CAN gracefully restart it.  But then a second later the httpd deamon is
not
> running.  I do a apachectl status and it says it is not running and that
it
> cannot access the http://localhost:server-status.  If i try to manually
> start it again it says that i cannot.
>
> What am i doing wrong?
Sorry, cant be much help here... I am running 2.0.35 on Win32... Someone
else pick up on this for him please...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org