小編這里用的是阿里云liunx一鍵擺設,究竟結果也是小白,也是碰到此類問題,而網上良多都不克不及當作功,最后花了不少時候連系一些常識最終試探解決。大師問題解決記得點個攢哦~
 打開wordpress后臺設置里的固心猿意馬鏈接,點竄為 /%post_id%.html如下圖:
 打開辦事器進入cd /alidata/server/nginx/conf/vhosts/,點竄對應的wordpress站點的.conf文件。小編這里是wordpress.conf如圖輸入即可!
 對應以下輸入點竄或添加
server {
listen 80;
server_name 域名;
index index.html index.htm index.php;
root 站點地點的目次;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
#偽靜態設置路徑 和日記文件路徑
include /etc/nginx/rewrite/default.conf;
access_log /var/log/nginx/wordpress.log;
確定: 按ESC 輸入 :wq 回車冒號也輸!
 最后重啟nginx,輸入service nginx restar 回車。
 以上竣事wordpress站點后臺、頁面就能正常操作了。
 
 0 篇文章
如果覺得我的文章對您有用,請隨意打賞。你的支持將鼓勵我繼續創作!