Last active
June 1, 2016 08:34
-
-
Save f-akazawa/da65da9798373b4808a8 to your computer and use it in GitHub Desktop.
nginxとphp-fpmでhtmlファイルのphpを動かす ref: http://qiita.com/f-akazawa/items/a5d0bf61d78a052df85a
This file contains 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
/etc/php-fpm.d/www.conf | |
user = nginx | |
group = nginx | |
listen = /var/run/php-fpm/php-fpm.sock | |
listen.mode = 660 | |
security.limit_extensions = .php .html |
This file contains 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
/etc/nginx/conf.d/server.conf | |
location /{ | |
root /usr/share/nginx/html; | |
index index.php index.html; | |
} | |
location ~\.(php|html)${ | |
root /usr/share/nginx/html; | |
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_script_name; | |
include fastcgi_params; | |
} |
This file contains 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
#sudo /etc/init.d/iptables stop | |
#sudo /etc/init.d/ip6tables stop | |
#sudo chkconfig iptables off | |
#sudo chkconfig ip6tables off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment