标签:install com vps includes bmp nbsp ecif efault nginx
1、一键安装lnmp后:访问其他站点,报404错误。
安装lnmp:
yum -y install screen wget screen -S lnmp wget http://soft.vpser.net/lnmp/lnmp1.6.tar.gz -cO lnmp1.6.tar.gz && tar zxf lnmp1.6.tar.gz && cd lnmp1.6 && ./install.sh lnmp
访问站点,报404错误:
2、检查vi /usr/local/nginx/conf/vhost/dedecms.xxx.top.conf 文件,发现root dedecms.xxx.top 目录路径不对,
server { listen 80; #listen [::]:80; server_name wp.insapi.top ; index index.html index.htm index.php default.html default.htm default.php; root /home/wwwroot/dedecms; #此处原来为root dedecms; include rewrite/other.conf; #error_page 404 /404.html; # Deny access to PHP files in specific directory #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; } include enable-php.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; }
location ~ /.well-known { allow all; }
更正后访问即可正常解析。
lnmp一键安装访问default目录可行,访问其它站点报404错误
标签:install com vps includes bmp nbsp ecif efault nginx
原文地址:https://www.cnblogs.com/betobe/p/12364830.html