Created
April 27, 2015 09:29
-
-
Save wizonesolutions/a7a9e8c9dac349fbe9b7 to your computer and use it in GitHub Desktop.
Apache PHP config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Directory /home/example/public_html> | |
| # Set PHP-FPM directory options | |
| Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI | |
| allow from all | |
| AllowOverride All | |
| </Directory> | |
| RewriteEngine on | |
| # Configure PHP-FPM to handle PHP | |
| RemoveHandler .php | |
| RemoveHandler .php5 | |
| AddHandler php5-fcgi .php .php5 | |
| Action php5-fcgi /fcgi-bin/php5-example.external virtual | |
| Action application/x-httpd-php /fcgi-bin/php5-example.external | |
| Alias /fcgi-bin/php5-example.external /php5-example.external | |
| # Prevent requests for the PHP-FPM server | |
| <Location /fcgi-bin/php5.external> | |
| Order Deny,Allow | |
| Deny from All | |
| Allow from env=REDIRECT_STATUS | |
| </Location> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
^
For the record, not getting any SELinux failures in
/var/log/audit. And this same approach (minus thevirtualafter thephp5-fcgiActionworks elsewhere w/o issue. I'm porting my Apache config from a Lucid box to a CentOS 6 box.