我正嘗試在LEMP安裝程序的Linux VPS中安裝一個WordPress站點。到目前爲止,我已經完成了設置wordpress文件併爲WP目錄/文件中的nginx用戶/組設置所有權,但是當我訪問WP(https://domain.tld/wp-admin/install.php)的安裝頁面時,我最終得到了一個php文件下載代替。在Nginx上安裝Wordpress的錯誤
下面是爲WP網站我的虛擬主機配置:
server {
\t listen 80;
\t server_name domain.tld;
\t return 301 https://$server_name$request_uri;
}
server {
\t listen 443 ssl;
\t ssl on;
\t ssl_certificate /directory/to/crt;
\t ssl_certificate_key /directory/to/key;
\t
\t server_name domain.tld;
\t root /var/www/html/domain.tld;
\t index index.php index.html index.htm;
\t location/{
\t try_files $uri $uri/ /index.php?q=$uri&$args;
\t }
\t rewrite /wp-admin$ $scheme://$host$uri/ permanent;
\t \t
\t error_page 404 /404.html;
\t error_page 500 502 503 504 /50x.html;
\t location = /50x.html {
\t root /usr/share/nginx/html;
\t }
\t location ~ \.php$ {
\t try_files $uri =404;
\t fastcgi_split_path_info ^(.+\.php)(/.+)$;
\t fastcgi_pass unix:/var/run/php5-fpm.sock;
\t fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
\t fastcgi_index index.php;
\t include fastcgi_params;
\t }
}
編輯:我試圖在Firefox和它的作用不同於在Chrome中。 install.php頁面代替了這樣的錯誤頁面:
An error occurred。
對不起,您正在查找的頁面目前無法使用。 請稍後再試。
如果您是此資源的系統管理員,那麼您應該檢查>錯誤日誌以瞭解詳細信息。
忠實於你,nginx。
你能夠訪問服務器的錯誤日誌? –