开发者社区> 问答> 正文

wordpress网站除了首页内部链接全部打不开,nginx报错404

纯净系统下新装了AMH5.5极速版,安装了NGINX-1.14+MYSQL5.5+PHP5.3, 通过wordpress建站 ,老网站搬迁过来后,只有首页能显示,外链可以打开,图片显示正常,其他内部链接全部都打不开,点击显示nginx报错404,请问是什么问题?wp后台也已经设置了固定连接,百度查都说是伪静态没设置好,这个具体怎么设置,能否帮忙解决?

以下提供创建的lnmp环境下的nginx-host-subdomain-template.conf文件内容,
根目录为:/home/wwwroot/logoju/etc

server
{

listen  80; #listen end
server_name amh.sh; #server_name end
index index.html index.htm index.php; #index end

root  lnmp_root/domain/amh.sh/web/dir_name; #root end
include lnmp_root/rewrite/amh.conf; #rewrite end

#error_page
location ~ /ErrorPages/(400|401|403|404|405|502|503)\.html$ 
{
    root lnmp_root/domain/amh.sh/web;
}
location ~ .*\.php$
{
    fastcgi_pass  unix:/tmp/php-cgi.sock;
    fastcgi_index index.php;
    include fcgi.conf;
    fastcgi_param DOCUMENT_ROOT  lnmp_root/domain/amh.sh/web/dir_name;
    fastcgi_param SCRIPT_FILENAME  lnmp_root/domain/amh.sh/web/dir_name$fastcgi_script_name;
}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp3|wma)$
{
    expires      30d;
}

location ~ .*\.(js|css)$
{
    expires      12h;
}

access_log off; #access_log end
error_log /dev/null; #error_log end

另外/usr/local/nginx-1.14/conf,此目录下nginx.conf文件也贴出来,求大神帮忙看看
user www www;
worker_processes auto;

Specifies the value for maximum file descriptors that can be opened by this process.

worker_rlimit_nofile 51200;

events
{

use epoll;
worker_connections 51200;

}

http
{

include  mime.types;
default_type  application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 4k;
large_client_header_buffers 4 4k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;

keepalive_timeout 60 60;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 16k;
fastcgi_buffers 16 16k;
fastcgi_busy_buffers_size 16k;
fastcgi_temp_file_write_size 16k;
fastcgi_intercept_errors on; 

tcp_nodelay on;
server_tokens off;
gzip             on;
gzip_min_length  1000;
gzip_proxied     expired no-cache no-store private auth;
gzip_types       text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/xml application/rss+xml application/xhtml+xml application/atom_xml;
gzip_disable "MSIE [1-6].(?!.*SV1)";
log_format  access  '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer"  "$http_user_agent" $http_x_forwarded_for';
include /home/wwwroot/logoju/vhost/*.conf;
include /home/wwwroot/litchibrand/vhost/*.conf;
include /usr/local/amh-5.5/vhost/amh-nginx.conf;

}

展开
收起
标志工场 2019-03-26 09:13:49 3846 0
1 条回答
写回答
取消 提交回答
  • 关注云生态,专注云服务。

    .htaccess 文件缺失

    2019-12-13 23:53:10
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Nginx 代理系统常用手册》 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载