扫码关注官方订阅号
我想在根目录中安装一个静态网站,在子目录中安装wordpress(/blog/)应该如何设置?
业精于勤,荒于嬉;行成于思,毁于随。
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; } }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
业精于勤,荒于嬉;行成于思,毁于随。