2017-11-12 9 views
0

を実行する上でWordpressのために指定されていません入力ファイル私はCentos 7ローカルVirtualboxのCentOSに7 VMは、nginxの

に私の地元のWordpressサイト上でかなりパーマリンクを使用しようとしています。しかし、私はポストに行くしようとしたとき、私はNo file specified

を取得

私はこのサイトを共有フォルダに持っていますが、VM上の通常のフォルダに置いても動作しません。

私はすべての回答を見てきましたが、答えが見つかりませんでした。

は、ここに私の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; 
} 
} 
+1

このエラーは、 '/ var/www/html/index.php'が存在しないことを意味します。あなたのWordPressサイトのURLは何ですか?不足しているサブディレクトリはありますか? –

+0

くそー!私はDuh、 'index.php'を入れました!!! –

答えて

0

私はちょうど私のルートWebディレクトリにindex.phpを移動しなければならなかったです。

+0

WordPressのインストールで 'index.php'を動かす必要はありません。あなたの 'try_files'ステートメントは、WordPressのトップレベルの' index.php'ファイルの実際のURIを指していなければなりません。 'try_files $ uri $ uri//blog/index.php;' –

関連する問題