SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2001
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    namevirtualhost error msg dont have permission to access /

    Hi

    Ive been trying to set up a namevirtualhost, ive altered my hosts file which
    looks like this
    127.0.0.1 localhost.localdomain localhost
    127.0.0.1 www.peta.com.au

    then i added to the httpd.conf

    NameVirtualHost 127.0.0.1
    <VirtualHost 127.0.0.1>
    ServerName www.peta.com.au
    DocumentRoot /home/peta/web
    <Directory /home/peta/web>
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>

    I have an index file in the above document root.


    When i type in the address into the browser i get an error msg
    saying i dont have permission to access /

    it dont seem to matter where i define the document root for the virtual host
    ...i always get the same message.. plus defining a namevirtual host seems to
    stop me accessing any file ...i get the same msg even for the localhost but
    soon as i comment out the namevirtualhost directives the localhost works
    fine.

    i think its probably a simple prob but i just cant work it out!

    thanks chris

  2. #2
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    I think you forget to put inside the directory block this:

    Options All
    AllowOverride All

    so
    <Directory /home/peta/web>
    Options All
    AllowOverride All

    Order allow,deny
    Allow from all
    </Directory>

    or whatever you wanted to customize it...



    pippo
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03


Bookmarks

Posting Permissions

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