av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術文章
文章詳情頁

wordpress 移動到子目錄,nginx 如何配置

瀏覽:150日期:2022-06-25 13:18:22

問題描述

我有個wordpress 站點,是用 lnmp環境搭建的。以前wordpress部署在根目錄,直接用域名 www.xxxxx.com 能夠訪問。 先我想把這個wordpress移動到子目錄中去,例如移動到根目錄的mse_cn 文件夾下,然后訪問通過www.xxxxx.com/mse_cn 首先我把代碼都移到了mse_cn 文件夾下,然后修改了nginx的配置:

server { listen 80; server_name www.xxxx.com; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main;location ^~ /mse_cn { root /usr/share/nginx/html; index index.php index.html index.htm; try_files $uri $uri/ /mse_cn/index.php; location ~ .php {fastcgi_split_path_info ^(.*.php)(.*)$;include fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_INFO $fastcgi_path_info;fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;fastcgi_pass 127.0.0.1:9000; }} error_page 500 502 503 504 /50x.html; location = /50x.html {root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ .php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # deny access to .htaccess files, if Apache’s document root # concurs with nginx’s one # location ~ /.ht {deny all; }}

重新加載nginx配置文件,然后我訪問 www.xxxxx.com/mse_cn 報404錯誤,而且頁面顯示得很奇怪,請求高手幫助!!!

wordpress 移動到子目錄,nginx 如何配置

問題解答

回答1:

location ^~ /mse_cn {

root /usr/share/nginx/html;

是什么鬼?lnmp默認不應該是在/home/wwwroot這個目錄中么?www.xxxxx.com/mse_cn 要通過這種形式訪問,只需要把wp移動到之前xxxxx.com的mse_cn目錄中就可以了,nginx原有vhost.conf不用做任何修改

標簽: word
相關文章:
主站蜘蛛池模板: 中文字幕av网 | 精品久久电影 | 久久小视频 | 成人精品一区二区三区 | 中文字幕99 | 中文在线亚洲 | 日本亚洲精品成人欧美一区 | 国产成人精品一区二区三区四区 | 国产一区二区在线免费观看 | 成人精品国产一区二区4080 | 亚洲一区二区三区在线免费观看 | 综合久久综合久久 | 中文在线一区二区 | 成人亚洲在线 | 亚洲综合天堂网 | 国产一区二区三区在线视频 | 久久综合成人精品亚洲另类欧美 | 日韩久久久一区二区 | 亚洲精品久久久久久国产精华液 | www.婷婷| 国产精品久久久久久久久久 | 国产丝袜一区二区三区免费视频 | 欧美精品91| 成人免费一区二区三区视频网站 | 成人妇女免费播放久久久 | 欧美三级视频 | 99久9| 成人毛片一区二区三区 | 天天综合日日夜夜 | 欧美日韩精品影院 | 日韩欧美综合在线视频 | 欧美一区 | 成人精品 | 久久久久欧美 | 亚洲高清成人在线 | 超碰97免费观看 | 欧美在线一二三 | 狠狠综合久久av一区二区小说 | 麻豆亚洲 | 欧美一级免费看 | 欧美xxxx在线|