
在使用 laradocker 设置好环境后,配置了 nginx 配置文件 app.conf。然而,访问网站后台后,用户遇到了以下页面,而不能正常访问后台首页。
为了解决此问题,需要对 nginx 配置文件进行修改:
location ~ \.php$ {
# try_files $uri /index.php =404;
fastcgi_pass php-upstream;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fixes timeouts
fastcgi_read_timeout 600;
include fastcgi_params;
}
location /admin.php {
fastcgi_pass php-upstream;
fastcgi_param SCRIPT_FILENAME /var/www/your_directionary/admin.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}上述修改主要涉及:
以上就是Laradocker Nginx 配置问题:如何解决访问网站后台出现空白页面的问题?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号