Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Location
    Oklahoma City, OK
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Error 403 on localhost

    I'm new to LINUX and Apache. I have an index.php file included in the htdocs folder in the www folder in the root.

    I'm at a loss. I've googled the problem and keep seeing that I need to make these changes, but I'm not sure where to make them.

    <Directory "/home/domain/www">
    Options +Indexes FollowSymLinks +ExecCGI
    AllowOverride AuthConfig FileInfo
    Order allow,deny
    Allow from all
    </Directory>

    Thanks

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Check your error_log and post the exact error you are getting. I suspect your path is wrong since you mention htdocs being in www, but that is not in your Directory directive path.

  • #3
    New Coder
    Join Date
    Jan 2010
    Location
    Birmingham, MI
    Posts
    98
    Thanks
    3
    Thanked 9 Times in 9 Posts
    It might not recognize PHP as an index file by default. Apache2 is set by default to serve from /var/www by default in Ubuntu. If that is what you are running, I bet it would recognize an html file. The It Works! default index file for instance. You could try adding lines like the ones below to your httpd.conf configuration. The dir_module should tell apache which files to recognize as indexes. Make sure the module is loaded though.

    Code:
    <FilesMatch "\.php$">
        SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
    </FilesMatch>
    
    <IfModule dir_module>
    DirectoryIndex index.php index.html
    </IfModule>
    Last edited by JamesOxford; 10-05-2011 at 11:00 PM.


  •  

    Posting Permissions

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