cloudswave / blog

在issue写个人博客,自动发布到csdn和github pages
2 stars 1 forks source link

amh面板部署typecho博客后显示404错误 #25

Open cloudswave opened 1 year ago

cloudswave commented 1 year ago

安装typecho完成后访问后台和文章显示404 修改nginx配置:/home/wwwroot/lnmp01/vhost/typecho.conf

...
location ~ .*\.php(\/.*)*$
    {
        fastcgi_pass  unix:/tmp/php-cgi-lnmp01-typecho.sock;
...

修改重写规则:/home/wwwroot/lnmp01/rewrite/amh.conf

if (-f $request_filename/index.php){
    rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
    rewrite (.*) /index.php;
}

重启nginx

killall nginx
/usr/local/nginx-generic-1.20/sbin/nginx