CodeIgniter 4+Nginx环境下VTiger登录后出现404错误求助
问题:CodeIgniter 4 + VTiger 登录后跳转404错误
我使用CodeIgniter 4、Composer搭配MySQL数据库搭建VTiger网站,已按照CodeIgniter官方文档完成安装。当前遇到的问题是:登录页面可正常访问,输入正确的登录凭证后(无任何凭证错误提示),网站直接跳转至404页面。此前曾出现401未授权错误,修改Nginx配置后变为当前的404问题。
以下是我的Nginx配置文件:
server { root /var/www/html/mydomain.com/; error_log /var/log/nginx/mydomain.com.error.log debug; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html index.php; server_name mydomain.com; location / { try_files $uri $uri/ /index.php$is_args$args; } # pass PHP scripts to FastCGI server # location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php8.2-fpm.sock; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\. { deny all; } listen [::]:443 ssl http2; # managed by Certbot listen 443 ssl http2; # managed by Certbot ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem; # managed by Certbot #include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = mydomain.com) { return 301 https://$host$request_uri; } # managed by Certbot server_name mydomain.com; listen [::]:80; listen 80; # return 404; # managed by Certbot }
已完成的排查步骤:
- 已检查PHP必要扩展,确认符合CodeIgniter 4运行要求
希望有经验的开发者帮忙定位问题或提供排查方向,如需更多配置信息请告知。
内容的提问来源于stack exchange,提问作者Brayan Martinez Espinosa
相关产品推荐
相关产品推荐

