joomla3.6.5 nginx下 前台页面404错误
来源:互联网 发布:网络招聘平台有哪些 编辑:程序博客网 时间:2024/06/14 05:01
正常安装 joomla3.6.5后 后台可以打开 前台页面404 百度后发现是没有配置 nginx的伪静态规则 joomla官方提供了配置文件 地址:http://docs.joomla.org/Nginx 配置如下:
server { listen 80; server_name YOUR_DOMAIN; server_name_in_redirect off; access_log /var/log/nginx/localhost.access_log; error_log /var/log/nginx/localhost.error_log info; root PATH_ON_SERVER; index index.php index.html index.htm default.html default.htm; # Support Clean (aka Search Engine Friendly) URLs location / { try_files $uri $uri/ /index.php?$args; } # deny running scripts inside writable directories location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ { return 403; error_page 403 /403_error.html; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi.conf; } # caching of files location ~* \.(ico|pdf|flv)$ { expires 1y; } location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ { expires 14d; }}
伪静态规则在于 try_files $uri $uri/ /index.php?$args; 这句话 加入后重启nginx 前台页面正常了 我的nginx配置如下:
server { listen 80; server_name xxxxx.xxxx.org; charset utf-8; access_log /www/log/xxxxx.xxxx.org.log main; location / { root /www/xxxxx.xxxx.org; index index.php index.html index.htm; try_files $uri $uri/ /index.php?$args; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /www/xxxxx.xxxx.org$fastcgi_script_name; include fastcgi_params; } location ~ \.(less|sql)$ { deny all; }}
0 0
- joomla3.6.5 nginx下 前台页面404错误
- nginx 配置 404 错误 页面
- nginx自定义404错误页面
- NGINX 配置404错误页面转向
- NGINX 配置404错误页面转向
- NGINX 配置404错误页面转向
- nginx 设置403、404、等错误页面
- NGINX 配置404错误页面转向
- NGINX 配置404错误页面转向
- Nginx网站自定义404错误页面
- NGINX 配置404错误页面转向
- NGINX 配置404错误页面转向
- NGINX服务器404错误页面设置
- NGINX下如何自定义404页面
- NGINX下如何自定义404页面
- 解决 ci yii 下nginx 404 错误
- codeigniter在nginx下控制器404错误
- nginx fastcgi 自定义错误页面
- ZOJ 3323Somali Pirates
- oracle11g客户端和pl/sql配置及使用(Windows系统)
- 学习、解决问题的奇招——看Demo
- eclipse里xml提示包名的插件——Rinzo
- ZOJ 3324Machine
- joomla3.6.5 nginx下 前台页面404错误
- 水仙花数
- 往数据库里添加date(时间)类型的数据
- java-抛异常和捕获异常
- 12个最应该使用的Linux服务器OS(中)
- 算法导论——最长公共子序列
- java中实现类似函数指针的功能
- AOP之Aspectj案例
- 关于QR二维码