Tag: Debian/Nginx
# wget http://nginx.org/keys/nginx_signing.key # apt-key add nginx_signing.key
deb http://nginx.org/packages/debian/ jessie nginx deb-src http://nginx.org/packages/debian/ jessie nginx
apt-get install nginx
systemctl stop apache # だめな場合/etc/init.d/apache2 stop systemctl disable apache
systemctl start nginx systemctl enable nginx
user = nginx group = nginx listen.owner = nginx listen.group = nginx
ls -l /var/run/php5-fpm.sock
systemctl restart php5-fpm
location ~ \.php$ { root /usr/share/nginx/html; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
systemctl restart nginx
<?php phpinfo(); ?>