如何将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. html5和Flash对抗是什么情况?2. javascript - js怎么实现jq的addclass,removeclass,例如本来是 class="aa",要变成class="aa bb"3. javascript - mongodb 引用 删除数据时无法删除引用4. 关于Python的服务器客户端交互问题5. 想练支付宝对接和微信支付对接开发(Java),好像个人不可以,怎么弄个企业的6. python相关问题求解决,有偿7. javascript - 求解答,koa-bodyparser获取到的参数是空对象,为什么?????8. html5 - ajax post请求后如何渲染到页面上9. linux - 升级到Python3.6后GDB无法正常运行?10. javascript - perfect-scrollbar 插件的使用
![想练支付宝对接和微信支付对接开发(Java),好像个人不可以,怎么弄个企业的](http://www.haobala.com/attached/image/16.jpg)