Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cloudswave opened this issue Feb 11, 2023 · 0 comments
Open

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

cloudswave opened this issue Feb 11, 2023 · 0 comments
Labels
Milestone

Comments

@cloudswave
Copy link
Owner

cloudswave commented Feb 11, 2023

安装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
@cloudswave cloudswave added this to the publish milestone Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant