V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
benbenlang
V2EX  ›  问与答

Wordpress 经常出现 The requested URL ' ' was not found on this server.怎么解决?

  •  
  •   benbenlang · 2017-03-25 00:04:30 +08:00 · 6945 次点击
    这是一个创建于 2651 天前的主题,其中的信息可能已经有所发展或是发生改变。

    服务器是阿里云,前天心血来潮用了下腾讯的 CDN ,刚用感觉很爽啊,速度很快,但才一天就发现整个网站处处都是 The requested URL ' ' was not found on this server 。。。 我把 CDN 关了,固定链接重新设置都没能解决问题。。 现在网站直接解析到阿里云的 IP 上,网站还是不是会出 The requested URL ' ' was not found on this server 的问题。。。 有哪位大哥解决过这个问题吗,求支招。 我 nginx 配置发下面

    user www www; worker_processes auto;

    error_log /data/wwwlogs/error_nginx.log crit; pid /var/run/nginx.pid; worker_rlimit_nofile 65535;

    events { use epoll; worker_connections 8896; multi_accept on; }

    http {

    include mime.types;
    default_type application/octet-stream;
    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 1024m;
    sendfile on;
    tcp_nopush on;
    keepalive_timeout 120;
    server_tokens off;
    tcp_nodelay on;
    
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 128k;
    
    #Gzip Compression
    gzip on;
    gzip_buffers 16 8k;
    gzip_comp_level 6;
    gzip_http_version 1.1;
    gzip_min_length 256;
    gzip_proxied any;
    gzip_vary on;
    gzip_types
        text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
        text/javascript application/javascript application/x-javascript
        text/x-json application/json application/x-web-app-manifest+json
        text/css text/plain text/x-component
        font/opentype application/x-font-ttf application/vnd.ms-fontobject
        image/x-icon;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
    
    #If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
    open_file_cache max=1000 inactive=20s;
    open_file_cache_valid 30s;
    open_file_cache_min_uses 2;
    open_file_cache_errors on;
    

    ######################## default ############################ server { listen 8080; server_name localhost;

    access_log /data/wwwlogs/access_nginx.log combined;
    root /data/wwwroot/www.wodeyuming.com;
    
    index index.html index.htm index.php;
    
    
    location /nginx_status {
        stub_status on;
        access_log off;
        allow 127.0.0.1;
        deny all;
        }
    location ~ [^/]\.php(/|$) {
        #fastcgi_pass remote_php_ip:9000;
        fastcgi_pass unix:/dev/shm/php-cgi.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
        }
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
        expires 30d;
        access_log off;
        }
    location ~ .*\.(js|css)?$ {
        expires 7d;
        access_log off;
        }
    }
    

    ########################## vhost ############################# include vhost/*.conf;

    }

    php-fpm.conf 配置

    [global] pid = run/php-fpm.pid error_log = log/php-fpm.log log_level = warning

    emergency_restart_threshold = 60 emergency_restart_interval = 60s process_control_timeout = 5s daemonize = yes

    ;;;;;;;;;;;;;;;;;;;; ; Pool Definitions ; ;;;;;;;;;;;;;;;;;;;;

    [www] ;listen string 设置接受 FastCGI 请求的地址。可用格式为:'ip:port','port','/path/to/unix/socket'。每个进程池都需要设置。 listen = /dev/shm/php-cgi.sock ;listen.backlog int 设置 listen(2) 的半连接队列长度。“-1 ”表示无限制。默认值:-1 。 listen.backlog = -1 ;listen.allowed_clients string 设置允许连接到 FastCGI 的服务器 IPV4 地址。等同于 PHP FastCGI (5.2.2+) 中的 FCGI_WEB_SERVER_ADDRS 环境变量。仅对 TCP 监听起作用。每个地址是用逗号分隔,如果没有设置或者为空,则允许任何服务器请求连接。默认值: any 。 listen.allowed_clients = 127.0.0.1 ;listen.owner string 如果使用,表示设置 Unix 套接字的权限。在 Linux 中,读写权限必须设置,以便用于 WEB 服务器连接。在很多 BSD 派生的系统中可以忽略权限允许自由连接。默认值:运行所使用的用户和组,权限为 0666 。 ;listen.owner = www ;listen.group = www ;listen.mode = 0666 ;user = www ;group = www listen.owner = www listen.group = www listen.mode = 0660 user = www group = www ;pm string ;设置进程管理器如何管理子进程。可用值: static , ondemand , dynamic 。必须设置。 ;static - 子进程的数量是固定的( pm.max_children )。 ;ondemand - 进程在有需求时才产生(当请求时,与 dynamic 相反, pm.start_servers 在服务启动时即启动。 ;dynamic - 子进程的数量在下面配置的基础上动态设置: pm.max_children , pm.start_servers , pm.min_spare_servers , pm.max_spare_servers 。 pm = dynamic ;pm.max_children int pm 设置为 static 时表示创建的子进程的数量, pm 设置为 dynamic 时表示最大可创建的子进程的数量。必须设置。 ;该选项设置可以同时提供服务的请求数限制。类似 Apache 的 mpm_prefork 中 MaxClients 的设置和 普通 PHP FastCGI 中的 PHP_FCGI_CHILDREN 环境变量。 pm.max_children = 128 ;pm.start_servers int 设置启动时创建的子进程数目。仅在 pm 设置为 dynamic 时使用。默认值: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 。 pm.start_servers = 20 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 5000 pm.process_idle_timeout = 10s request_terminate_timeout = 60 request_slowlog_timeout = 0

    pm.status_path = /php-fpm_status slowlog = log/slow.log rlimit_files = 2048 rlimit_core = 0

    catch_workers_output = yes

    env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP] = /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp

    还需要看什么配置的大家吱声,我都贴上来,,,,谢谢大家了!

    1 条回复    2017-03-25 00:19:48 +08:00
    akira
        1
    akira  
       2017-03-25 00:19:48 +08:00
    最关键的错误日志呢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4975 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 07:36 · PVG 15:36 · LAX 00:36 · JFK 03:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.