logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: PHP - FastCGI (403 on all PHP files) - fixed ... but why?
Author
TheArkive



Joined: 19 Jun 2013
Posts: 4

PostPosted: Mon 28 Jul '14 16:06    Post subject: PHP - FastCGI (403 on all PHP files) - fixed ... but why? Reply with quote

I know I've seen this being asked a lot from all my searching and there seems to be a few different versions of how to fix this.

I actually came up with a fix for mine and I haven't seen it here yet so I'm just adding this for documentation purposes and hopefully someone can enlighten me as to why this works.

As a base I have a very simple conf; the following is part of my main conf:

Code:
<Directory />
   AllowOverride All
</Directory>


And then I modify access with my htaccess files.

Previously I had:

- Apache v2.2.24 win32 (VC10)
- PHP v5.4.16 NTS win32

I recently upgraded my servers to:

- Apache v2.4.9 win32 (VC11)
- PHP v5.5.13 NTS win32

I found a few bits of info on apachelounge:

- access_compat is deprecated > replaced all Allow/Order with Require
- # comment out LoadModule for access_compat
- Add ExecCGI to Options

Here's the main differences I found between the old servers and the new:

1) ExecCGI is required in Options.
2) If you use Rewrite Engine, then FollowSymLinks must be allowed in options. (is this new?)

That Rewrite engine and FollowSymLinks bit is what really messed me up the most since it wasn't an issue in the previous version. After endless restarts and config changes i finally spotted that line in my error.log saying that access was denied because Rewrite Engine was on and FollowSymLinks was off. The odd part was that I never saw that error until the last few hours when I was clearing the error log after every attempt. And I know there were several instances when the Rewrite Engine was on and FollowSymLinks was off but no such error was in the log (that I could see anyways).

Any ideas when that FollowSymLinks requirement for the Rewrite Engine was added?

and...

Any idea as to why that error wouldn't show up earlier?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7306
Location: Germany, Next to Hamburg

PostPosted: Tue 29 Jul '14 11:11    Post subject: Reply with quote

At least from my experience I don't need that FollowSymLinks unless I have a symlink on linux or use a junction on windows.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7306
Location: Germany, Next to Hamburg

PostPosted: Tue 29 Jul '14 11:14    Post subject: Reply with quote

Quote:

Code:
<Directory />
   AllowOverride All
</Directory>



is a bad idea. You can do allow override for your document root. The / is for the drive letter ( example c:/ ).
Back to top
TheArkive



Joined: 19 Jun 2013
Posts: 4

PostPosted: Sat 02 Aug '14 18:04    Post subject: Reply with quote

Oops ... thanks for that. Definitely don't want that.
Back to top


Reply to topic   Topic: PHP - FastCGI (403 on all PHP files) - fixed ... but why? View previous topic :: View next topic
Post new topic   Forum Index -> Apache