Jump to content

Recommended Posts

Hey, I compiled Apache + PHP on Mac OSX,

Everything is fine except I get 404 - Forbidden every time I go to a directory other than / (localhost).

I had a look at my httpd.conf file and edited it but I still get the same result, here it is (without the comments):

 

ServerRoot "/apache2"

Listen 80

LoadModule php5_module        modules/libphp5.so

<IfModule !mpm_netware_module>
     User daemon
     Group daemon
</IfModule>
ServerAdmin you@example.com
DocumentRoot "/apache2/htdocs"

<Directory />
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
    Options    Indexes
</Directory>

<Directory />
    Options Indexes
    AllowOverride all
    Order Deny,Allow
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm index.html.var
</IfModule>
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
ErrorLog logs/error_log
LogLevel warn

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog logs/access_log common
</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/apache2/cgi-bin/"
</IfModule>

<IfModule cgid_module>
</IfModule>

<Directory "/apache2/cgi-bin">
    AllowOverride None
  	Options    Indexes
    Order allow,deny
    Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

Link to comment
https://forums.phpfreaks.com/topic/69611-solved-404-forbidden/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.