[英]Running WordPress on Nginx Keeps Downloading File
I am trying to run Wordpress on my NGinx server, however I think that something is wrong because the index.php file keeps downloading rather than being run. 我试图在NGinx服务器上运行Wordpress,但是我认为出了点问题,因为index.php文件一直在下载而不是在运行。
here is my sites-available: 这是我的网站可用:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/html;
index index.php index.html index.htm;
server_name your_domain.com;
location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php7.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
I checked to make sure that I had php7.1-fpm running and that my nginx was running as well. 我检查以确保已运行php7.1-fpm,并且我的nginx也正在运行。 Both checked out to be just fine. 两者都签出就好了。
What am I missing? 我想念什么?
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.