简体   繁体   English

在运行NGINX的本地Virtualbox Centos 7 VM上未为Wordpress指定输入文件

[英]No Input File Specified for Wordpress on Local Virtualbox Centos 7 VM running NGINX

I am trying to use pretty permalinks on my local Wordpress site on Centos 7 我正在尝试在Centos 7本地Wordpress网站上使用漂亮的永久链接

But when I try to go to a post I get No file specified 但是当我尝试去帖子时我No file specified

I do have this site in a shared folder but even when I put it on a regular folder on my VM it does not work. 我确实在共享文件夹中拥有此站点,但是即使将其放置在VM上的常规文件夹中也无法正常工作。

I have looked all over for an answer but have not found one. 我四处寻找答案,但没有找到答案。

Here is my nginx configuration file 这是我的nginx configuration file

server {
listen       80;
server_name  localhost;

# note that these lines are originally from the "location /" block
root   /var/www/html;
index index.php index.html index.htm;

location / {
    try_files $uri $uri/ /index.php?$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
    root /usr/share/nginx/html;
}

location ~ \.php$ {
    fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

我只需要将index.php移动到我的根Web目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM