如何將wordpress安裝在子目錄中?nginx配置文件該怎樣寫?
問題描述
我想在根目錄中安裝一個靜態網站,在子目錄中安裝wordpress(/blog/)應該如何設置?
問題解答
回答1:server { listen 80; server_name XXXXX.com; root/var/www/XXXXX.com; location / {index index.html index.htm; } location /blog {index index.html index.htm index.php;try_files $uri $uri/ /blog/index.php?$args; } location ~ .php$ {fastcgi_split_path_info ^(.+.php)(/.+)$;if (!-f $document_root$fastcgi_script_name) { return 404;}fastcgi_param PATH_INFO $fastcgi_path_info;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;include fastcgi_params;fastcgi_index index.php;# fastcgi_pass 127.0.0.1:9000;fastcgi_pass unix:/var/run/php5-fpm.sock; }}
相關文章:
1. docker鏡像push報錯2. 關docker hub上有些鏡像的tag被標記““This image has vulnerabilities””3. html5 - datatables 加載不出來數據。4. Docker for Mac 創建的dnsmasq容器連不上/不工作的問題5. node.js - mongodb查找子對象的名稱為某個值的對象的方法6. docker 下面創建的IMAGE 他們的 ID 一樣?這個是怎么回事????7. 運行python程序時出現“應用程序發生異?!钡膬却驽e誤?8. html5和Flash對抗是什么情況?9. 測試自動化html元素選擇器元素ID或DataAttribute [關閉]10. 前端 - @media query 使用出現的問題?

網公網安備