Last active
March 14, 2020 05:36
-
-
Save prantor19/f82b219e2dd103c537717647ddba1bf7 to your computer and use it in GitHub Desktop.
php-fpm apache
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
| LoadModule proxy_module modules/mod_proxy.so | |
| LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so | |
| Include conf/extra/php-fpm.conf |
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
| Enable file write | |
| sudo chcon -R -t httpd_sys_rw_content_t /var/www/html |
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
| # Redirect to local php-fpm if mod_php is not available | |
| <IfModule !mod_php7.c> | |
| <IfModule proxy_fcgi_module> | |
| # Enable http authorization headers | |
| <IfModule setenvif_module> | |
| SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 | |
| </IfModule> | |
| <FilesMatch ".+\.ph(ar|p|tml)$"> | |
| SetHandler "proxy:unix:/run/php/php7.2-fpm.sock|fcgi://localhost" | |
| </FilesMatch> | |
| <FilesMatch ".+\.phps$"> | |
| # Deny access to raw php sources by default | |
| # To re-enable it's recommended to enable access to the files | |
| # only in specific virtual host or directory | |
| Require all denied | |
| </FilesMatch> | |
| # Deny access to files without filename (e.g. '.php') | |
| <FilesMatch "^\.ph(ar|p|ps|tml)$"> | |
| Require all denied | |
| </FilesMatch> | |
| </IfModule> | |
| </IfModule> |
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
| [www] | |
| user = arif | |
| group = www-data | |
| listen = /run/php/php7.2-fpm.sock | |
| listen.owner = arif | |
| listen.group = www-data | |
| listen.mode = 0777 | |
| pm = dynamic | |
| pm.max_children = 5 | |
| pm.start_servers = 2 | |
| pm.min_spare_servers = 1 | |
| pm.max_spare_servers = 3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment