LoginSignup
0
1

More than 5 years have passed since last update.

nginx

Last updated at Posted at 2016-10-18

https
https://dogmap.jp/2011/05/10/nginx-ssl/

php4-fpmが入っているか確認

yum update
php-fpm -v

なかったので次のコマンド
http://qiita.com/nagomu1985/items/31f7a24ee406826721e0

オプション
shell-session
yum -y install yum-plugin-priorities
yum -y update
yum -y groupinstall "Base" "Development tools" "Japanese Support"

ここは入れる
shell-session
yum --enablerepo=remi,remi-php56 -y install php-fpm

サービスとして開始
https://lowendbox.com/blog/php-on-centos-7-php-fpm/

編集
/etc/php-fpm.d/www.conf

systemctl start php-fpm
systemctl enable php-fpm

リダイレクトなどこの辺参考
http://cloudrop.jp/wordpress/more_tuning_on_nginx

ここで.htaccess変換
https://winginx.com/ja/htaccess

defalut.conf
server {
    root /var/www/example.com;
    location / {
        try_files $uri $uri/ /index.html;
    }
}

$uriがなければ$uri/なければindex.html

php-fpmをsocektで
http://qiita.com/monkick@github/items/610d1435d812beb853e2
unix:/tmp/phpcgi.socket;にする

でfastcgi_pass unix:/var/run/php-fpm/php-fpm.socket;を設定

以下のエラー
nginx error connect to php5-fpm.sock failed (13: Permission denied)
http://stackoverflow.com/questions/23443398/nginx-error-connect-to-php5-fpm-sock-failed-13-permission-denied

sessionファイルの権限変える
/var/lib/php/session/

chown root:nginx /var/lib/php/*
chown -R nginx:nginx /var/lib/php/session
chown -R nginx:nginx /var/lib/php/wsdlcache

proxy_connect_timeout
proxy_send_timeout
proxy_read_timeout

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1