Skip to content

Instantly share code, notes, and snippets.

@f-akazawa
Last active June 1, 2016 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f-akazawa/da65da9798373b4808a8 to your computer and use it in GitHub Desktop.
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
/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
/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;
}
#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