Nginx配置PHP
#PHP 服务器
server {
listen 80;
listen [::]:80;
server_name nextcloud.saiita.cn;
root /var/www/nextcloud;
index index.html index.php *.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php {
include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}