Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, When I installed my little apache I used PHP Code: hxxp : //127.0.0.1/cacti  to access my application which is stored in PHP Code: / htdocs / cacti  Now I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2004
    Posts
    4

    Apache configuration with vhosts


    Hello,

    When I installed my little apache I used
    PHP Code:
    hxxp://127.0.0.1/cacti 
    to access my application which is stored in
    PHP Code:
    /htdocs/cacti 

    Now I added virtual hosts directive
    PHP Code:
    <VirtualHost *>
        
    ServerAdmin myname at myfirm
        DocumentRoot 
    /htdocs/sites/myfirm
        ServerName 3w
    .myfirm
        ErrorDocument 404 
    /404.html
        ErrorLog logs
    /myfirm-error_log
        CustomLog logs
    /myfirm-access_log common
    </VirtualHost
    And this sites sits in
    PHP Code:
    /htdocs/sites/myfirm 
    But when I try to access
    PHP Code:
    hxxp://127.0.0.1/cacti 
    Apache tries to access
    PHP Code:
    /htdocs/sites/myfirm/cacti 
    and not
    PHP Code:
    /htdocs/cacti 
    So Apache considers the default root path as
    PHP Code:
    /htdocs/sites/myfirm/cacti 
    instead of
    PHP Code:
    /htdocs/cacti 
    NB: As you can see my Apache is chrooted


    Any idea how could I solve my problem ?

    Thanx

  2. #2
    Just Joined!
    Join Date
    Apr 2004
    Posts
    4
    I solved my problem by adding a new virtual host with
    Code:
    ServerName 127.0.0.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •