ubuntu 下 wordpress 设置 Permalink 为 自定义结构后出现404页面 nginx - 404 not found page for permalinks
2015-05-08 15:22
746 查看
1. 先打开 nginx 配置文件 default
2. 编辑 default 文件
3. server 内的 location /{ ... } 加入
完成如下:
cd /etc/nginx/sites-available/
2. 编辑 default 文件
sudo vi default
3. server 内的 location /{ ... } 加入
try_files $uri $uri/ /index.php?$args;
完成如下:
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.php index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. #try_files $uri $uri/ =404; try_files $uri $uri/ /index.php?$args; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules }
相关文章推荐
- Ubuntu apt-get 出现Error 404:Not found Package Repository Errors
- wordpress 在nginx服务器下重写路由,解决设置固定链接后出现404错误
- wordpress 在Nginx服务器设置固定链接后出现404问题
- nginx 设置错误的自定义404页面跳转到500
- nginx 设置错误的自定义404页面跳转到500
- nginx 设置错误的自定义404页面跳转到500
- wordpress设置固定链接后文章出现404的解决办法 【ubuntu16.04】
- After move WordPress modify permalink some page display 404 in Nginx.
- nginx如何设置自定义404页面
- nginx 添加404页面后,仍然提示file not found
- NGINX自定义404页面设置方法
- Nginx配置error_page 404 500等自定义的错误页面
- 关于Ubuntu系统下Apache2的404自定义页面设置
- Ubuntu apt-get 出现Error 404:Not found Package Repository Errors
- 访问页面出错:The requested URL / was not found on this server. 网站打开出现404
- How to Fix UbuntuDebian apt-get 404 Not Found Repository Errors
- Wordpress“固定链接”页面出现404原因及解决方法
- 关于Class.forName()出现ClassNotFoundException错误!
- eclipse导出jar时出现Class files on classpath not found or not accessible for ...
- JSP页面使用EL表达式出现的问题:javax.el.PropertyNotFoundException: Property 'ID' not found on type java.lang.Str