Virtual host problem - Suse

This is a discussion on Virtual host problem - Suse ; And again I am struggeling with virtual hosting. :-( Obviously after each step I do a `rcapache restart` have added tph to my hosts file, so it points to 127.0.0.1 and I can surf to http://tph I have edited default-server.conf: ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Virtual host problem

  1. Virtual host problem

    And again I am struggeling with virtual hosting. :-(
    Obviously after each step I do a `rcapache restart`

    have added tph to my hosts file, so it points to 127.0.0.1 and I can
    surf to http://tph

    I have edited default-server.conf:
    DocumentRoot "/home/www/houghi.eu"


    I have edited listen.conf:
    NameVirtualHost *:80

    I then do the following in vhosts/tph.conf:

    DocumentRoot "/home/www/houghi.eu"
    ServerName *


    DocumentRoot "/home/www/houghi.eu"
    ServerName tph


    All works. I then edit aal houghi.eu in houghi.org and that also works.

    In both directories there is only one file. The only difference is that
    one says houghi.eu and the other houghi.org. No other text in there.

    However when I edit vhosts/tph.conf to the following, I get an error
    403, access forbidden.

    DocumentRoot "/home/www/houghi.eu"
    ServerName *


    DocumentRoot "/home/www/houghi.org"
    ServerName tph


    The error I get in my logfiles is:
    [error] [client 127.0.0.1] client denied by server configuration:
    /home/www/houghi.org/

    What is causing this and how do I solve it?

    houghi
    --
    It's people. Source code is made out of people! They're making our
    source out of people. Next thing they'll be breeding us like cattle
    for code. You've gotta tell them. You've gotta tell them!

  2. Re: Virtual host problem

    On Sun, 2 Dec 2007 13:22:32 +0100
    houghi wrote:

    > And again I am struggeling with virtual hosting. :-(
    > Obviously after each step I do a `rcapache restart`
    >
    > have added tph to my hosts file, so it points to 127.0.0.1 and I can
    > surf to http://tph
    >
    > I have edited default-server.conf:
    > DocumentRoot "/home/www/houghi.eu"
    >
    >
    > I have edited listen.conf:
    > NameVirtualHost *:80
    >
    > I then do the following in vhosts/tph.conf:
    >
    > DocumentRoot "/home/www/houghi.eu"
    > ServerName *
    >

    >
    > DocumentRoot "/home/www/houghi.eu"
    > ServerName tph
    >

    >
    > All works. I then edit aal houghi.eu in houghi.org and that also
    > works.
    >
    > In both directories there is only one file. The only difference is
    > that one says houghi.eu and the other houghi.org. No other text in
    > there.
    >
    > However when I edit vhosts/tph.conf to the following, I get an error
    > 403, access forbidden.
    >
    > DocumentRoot "/home/www/houghi.eu"
    > ServerName *
    >

    >
    > DocumentRoot "/home/www/houghi.org"
    > ServerName tph
    >

    >
    > The error I get in my logfiles is:
    > [error] [client 127.0.0.1] client denied by server configuration:
    > /home/www/houghi.org/
    >
    > What is causing this and how do I solve it?
    >
    > houghi

    Hi
    If you put tph first in the list does it work? If so add the
    SeverAlias directive.
    What apache version are you using? I'm using 2.2 on Ubuntu and have my
    vhosts in httpd.conf ServerName is the FQDN eg


    ServerName www.site.somewhere.net
    ServerAlias site.somewhere.net site
    DocumentRoot /xxx/xxxxx/xxxxxxxxx


    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all



    --
    Cheers Malcolm (Linux Counter #276890)
    SLED 10.0 SP1 x86_64 Kernel 2.6.16.53-0.16-smp
    up 7 days 14:01, 1 user, load average: 0.03, 0.23, 0.38

  3. Re: Virtual host problem

    On Sun, 2 Dec 2007, houghi wrote:-



    >The error I get in my logfiles is:
    >[error] [client 127.0.0.1] client denied by server configuration:
    >/home/www/houghi.org/
    >
    >What is causing this and how do I solve it?


    I've a feeling it might be because you've specified the server name as
    thp but the browser is passing the host name as thp.houghi.org .

    Anyway, this is a copy of my virtual host configuration, slightly
    modified for your domain. Fill in the missing bits, add and/or remove
    others, save it as vhosts.d/thp.conf and it should work just fine:


    ServerName tph.houghi.org
    ServerAdmin
    DocumentRoot /srv/www/houghi.org
    ErrorLog
    CustomLog combined

    ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"


    AllowOverride None
    Options +ExecCGI -Includes
    Order allow,deny
    Allow from all



    Options +FollowSymLinks +Includes MultiViews
    AllowOverride Limit
    Order allow,deny
    Allow from all

    DAV Off


    Options +FollowSymLinks +Includes +MultiViews


    Order deny,allow
    deny from all
    allow from localhost





    Regards,
    David Bolt

    --
    www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
    | SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit
    SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit |
    RISC OS 3.11 | RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC

  4. Re: Virtual host problem

    Malcolm wrote:
    > Hi
    > If you put tph first in the list does it work? If so add the
    > SeverAlias directive.
    > What apache version are you using? I'm using 2.2 on Ubuntu and have my
    > vhosts in httpd.conf ServerName is the FQDN eg
    >
    >
    > ServerName www.site.somewhere.net
    > ServerAlias site.somewhere.net site
    > DocumentRoot /xxx/xxxxx/xxxxxxxxx
    >
    >
    > Options FollowSymLinks
    > AllowOverride All
    > Order allow,deny
    > Allow from all
    >

    >


    OK, even if your solution was not the solution, it pointed me in the
    right direction. I should have added Directory. DUH!

    So I have added just the following to vhosts/tph.conf:

    DocumentRoot "/home/www/houghi.eu"
    ServerName tph

    Allow from localhost



    Seems to work. Thanks for pointing me in the right direction.

    houghi
    --
    It's people. Source code is made out of people! They're making our
    source out of people. Next thing they'll be breeding us like cattle
    for code. You've gotta tell them. You've gotta tell them!

  5. Re: Virtual host problem

    David Bolt wrote:
    > On Sun, 2 Dec 2007, houghi wrote:-
    >
    >
    >
    >>The error I get in my logfiles is:
    >>[error] [client 127.0.0.1] client denied by server configuration:
    >>/home/www/houghi.org/
    >>
    >>What is causing this and how do I solve it?

    >
    > I've a feeling it might be because you've specified the server name as
    > thp but the browser is passing the host name as thp.houghi.org .


    No, because all the stuff ain't on the internets. Anyway, I already
    posted the correct way how I do it. :-)

    Just curious, what does

    DAV Off

    do? What is it for?

    houghi
    --
    It's people. Source code is made out of people! They're making our
    source out of people. Next thing they'll be breeding us like cattle
    for code. You've gotta tell them. You've gotta tell them!

  6. Re: Virtual host problem

    On Sun, 2 Dec 2007, houghi wrote:-



    >Just curious, what does
    >
    > DAV Off
    >

    >do?


    If WEBDAV is turned on, it turns it off for this host and closes up some
    possible security holes.

    >What is it for?


    Here's the specs:



    And here's some documentation for mod_dav:




    Regards,
    David Bolt

    --
    www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
    | SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit
    SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit |
    RISC OS 3.11 | RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC

  7. Re: Virtual host problem

    houghi in :


    >
    > DocumentRoot "/home/www/houghi.eu"
    > ServerName *
    >



    DocumentRoot "/home/www/houghi.eu"
    ServerName *
    ServerAlias tph


    This an idea?

    P.

    --
    mailtoeter@dharma.dyn-o-saur.com

+ Reply to Thread