Title: ArakaTech's Replies | WordPress.org

---

# ArakaTech

  [  ](https://wordpress.org/support/users/arakatech/)

 *   [Profile](https://wordpress.org/support/users/arakatech/)
 *   [Topics Started](https://wordpress.org/support/users/arakatech/topics/)
 *   [Replies Created](https://wordpress.org/support/users/arakatech/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/arakatech/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/arakatech/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/arakatech/engagements/)
 *   [Favorites](https://wordpress.org/support/users/arakatech/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Converter for Media - Optimize images | Convert WebP & AVIF] Server configuration error ” Error codes: rewrites_cached “](https://wordpress.org/support/topic/server-configuration-error-error-codes-rewrites_cached/)
 *  Thread Starter [ArakaTech](https://wordpress.org/support/users/arakatech/)
 * (@arakatech)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/server-configuration-error-error-codes-rewrites_cached/#post-16104881)
 * Here the entire nginx conf;
 *     ```
       server {
   
       		# BEGIN Converter for Media
       		set $ext_avif ".avif";
       		if ($http_accept !~* "image/avif") {
       		set $ext_avif "";
       		}
   
       		set $ext_webp ".webp";
       		if ($http_accept !~* "image/webp") {
       			set $ext_webp "";
       		}
   
       		location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif|webp)$ {
       			add_header Vary Accept;
       			expires 365d;
       			try_files
               /wp-content/uploads-webpc/$path.$ext$ext_avif
               /wp-content/uploads-webpc/$path.$ext$ext_webp
               $uri =404;
       		}
       		# END Converter for Media
   
       		listen 80;
               listen 443 ssl http2;
               ssl_certificate /etc/ssl/mydomain.com/mydomain.com.crt;
               ssl_certificate_key /etc/ssl/mydomain.com/mydomain.com.key;
               root /var/www/html/mydomain.com;
               index index.php index.html index.htm;
               error_log /var/log/nginx/mydomain.com.error.log;
               server_name mydomain.com www.mydomain.com;
               location / {
   
                       try_files $uri $uri/ /index.php?$args;
               }
               if ($http_user_agent ~* (MJ12bot|SemrushBot|GrapeshotCrawler|BLEXBot|AhrefsBot|DotBot) ) { return 301 http://127.0.0.1/; }
               location ~* /(?:uploads|files)/.*\.(asp|bat|cgi|htm|html|ico|js|jsp|md|php|pl|py|sh|shtml|swf|twig|txt|yaml|yml|zip|gz|tar|bzip2|7z)$ { deny all; }
               location ~ \.php$ {
                       fastcgi_split_path_info ^(.+\.php)(/.+)$;
                       fastcgi_pass unix:/run/php/php7.4-mydomain.com-fpm.sock;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include fastcgi_params;
               }
               location = /wp-login.php {
                       limit_req zone=limit burst=1 nodelay;
                       limit_req_status 429;
                       fastcgi_pass unix:/run/php/php7.4-mydomain.com-fpm.sock;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include fastcgi_params;
               }
               location = /favicon.ico {
                       log_not_found off;
                       access_log off;
               }
               location = /robots.txt {
                       try_files $uri $uri/ /index.php?$args;
                       allow all;
                       log_not_found off;
                       access_log off;
               }
               location ~* \.(jpg|jpeg|png|gif|ico|css|js|eot|ttf|otf|woff|svg)$ {
                       expires 365d;
               }
   
                      include fastcgi_params;
               }
               location = /favicon.ico {
                       log_not_found off;
                       access_log off;
               }
               location = /robots.txt {
                       try_files $uri $uri/ /index.php?$args;
                       allow all;
                       log_not_found off;
                       access_log off;
               }
               location ~* \.(jpg|jpeg|png|gif|ico|css|js|eot|ttf|otf|woff|svg)$ {
                       expires 365d;
               }
               location ~ /\.ht {
                       deny all;
               }
               location ~ /\.us {
                       deny all;
               }
               location = /xmlrpc.php {
                       return 403;
               }
               rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
               rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
   
       }
       ```
   
 * thats all.
    so how to fix Server configuration error ” Error codes: rewrites_cached“??
 * thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Converter for Media - Optimize images | Convert WebP & AVIF] Server configuration error ” Error codes: rewrites_cached “](https://wordpress.org/support/topic/server-configuration-error-error-codes-rewrites_cached/)
 *  Thread Starter [ArakaTech](https://wordpress.org/support/users/arakatech/)
 * (@arakatech)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/server-configuration-error-error-codes-rewrites_cached/#post-16101290)
 * Hello [@mateuszgbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * Can you show me the example what you mean on _extra rules for image files_?
 * by the way, how to resolve the problem ?? Sorry, you haven’t provided a solution
   yet
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Converter for Media - Optimize images | Convert WebP & AVIF] Server configuration error ” Error codes: rewrites_cached “](https://wordpress.org/support/topic/server-configuration-error-error-codes-rewrites_cached/)
 *  Thread Starter [ArakaTech](https://wordpress.org/support/users/arakatech/)
 * (@arakatech)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/server-configuration-error-error-codes-rewrites_cached/#post-16094605)
 * Hello [@mateuszgbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * The nginx not support .htaccess i think. no panel used here.
 * and any rules configuration according to the plugin is placed correctly like 
   in the FAQ-Configuration for Nginx:
 * i put rule like below:
 * server {
 *     ```
       # BEGIN Converter for Media
       set $ext_avif ".avif";
       if ($http_accept !~* "image/avif") {
           set $ext_avif "";
       }
   
       set $ext_webp ".webp";
       if ($http_accept !~* "image/webp") {
           set $ext_webp "";
       }
   
       location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif|webp)$ {
           add_header Vary Accept;
           expires 365d;
           try_files
               /wp-content/uploads-webpc/$path.$ext$ext_avif
               /wp-content/uploads-webpc/$path.$ext$ext_webp
               $uri =404;
       }
       # END Converter for Media
       ```
   
 * and the rule for MIME Types have been checked also.
    using _/etc/nginx/mime.types_
 * image/webp webp;

Viewing 3 replies - 1 through 3 (of 3 total)