Want to subscribe to topics you're interested in?
Become a Member

Wordpress How to fix 404 not found nginx problem with webp

Discussion in 'Blogs & CMS usage' started by kinhatula, Oct 8, 2017.

  1. kinhatula

    kinhatula New Member

    7
    2
    3
    Sep 6, 2017
    Ratings:
    +2
    Local Time:
    4:09 AM
    This code in conf file, Please help me, Domain: hangmygiasi.net

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    # For HTTP/2 SSL Setup
    # read http://centminmod.com/nginx_configure_https_ssl_spdy.html
    
    # redirect from www to non-www  forced SSL
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    # server {
    #       listen   80;
    #       server_name hangmygiasi.net www.hangmygiasi.net;
    #       return 302 https://$server_name$request_uri;
    # }
    
    server {
      listen 443 ssl http2;
      server_name hangmygiasi.net www.hangmygiasi.net;
    
      include /usr/local/nginx/conf/ssl/hangmygiasi.net/hangmygiasi.net.crt.key.conf;
      include /usr/local/nginx/conf/ssl_include.conf;
    
      http2_max_field_size 16k;
      http2_max_header_size 32k;
      # mozilla recommended
      ssl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS;
      ssl_prefer_server_ciphers   on;
      #add_header Alternate-Protocol  443:npn-spdy/3;
    
      # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts
      #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
      #add_header X-Frame-Options SAMEORIGIN;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always;
      #spdy_headers_comp 5;
      ssl_buffer_size 1369;
      ssl_session_tickets on;
     
      # enable ocsp stapling
      resolver 8.8.8.8 8.8.4.4 valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/hangmygiasi.net/log/access.log combined buffer=256k flush=5m;
      error_log /home/nginx/domains/hangmygiasi.net/log/error.log;
    
      include /usr/local/nginx/conf/autoprotect/hangmygiasi.net/autoprotect-hangmygiasi.net.conf;
      root /home/nginx/domains/hangmygiasi.net/public;
      # uncomment cloudflare.conf include if using cloudflare for
      # server and/or vhost site
      #include /usr/local/nginx/conf/cloudflare.conf;
      include /usr/local/nginx/conf/503include-main.conf;
    
    
      location /wp-content/uploads/ {
      #pagespeed off;
      autoindex off;
      #add_header X-Robots-Tag "noindex, nofollow";
      location ~* ^/wp-content/uploads/.+\.(png|jpe?g)$ {
        expires 30d;
        add_header Vary "Accept-Encoding";
        add_header Cache-Control "public, no-transform";
        try_files $uri$webp_extension $uri =404;
      }
    }
    
    
    
      include /usr/local/nginx/conf/pre-staticfiles-local-hangmygiasi.net.conf;
      include /usr/local/nginx/conf/pre-staticfiles-global.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
     
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    
     
  2. Jon Snow

    Jon Snow Active Member

    156
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    6:09 PM
    Nginx 1.13.4
    MariaDB 10.1.26
    Seems like you've already solved the issue.
     
    • Like Like x 1
  3. kinhatula

    kinhatula New Member

    7
    2
    3
    Sep 6, 2017
    Ratings:
    +2
    Local Time:
    4:09 AM
    solved, thank You.
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    might help other folks too if you provide the fix/solution too :)