andrelauret23
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [WebP + AVIF converter] Too Many RedirectThank you for the reply ! Here is wordpress.conf, I have deleted webpavif.conf and moved changes before location /
root@******:/etc/nginx/conf.d/********# cat wordpress.conf location ~* wp\-content/(?!cache/fastware\-webpavif).+\.(jpe?g|png|gif|bmp|webp)$ { rewrite ^/wp-content/(.+)$ /wp-content/cache/fastware-webpavif/$1 last; } location ~* cache/fastware\-webpavif.+\.(jpe?g|png|gif|bmp)$ { add_header Vary Accept; try_files $uri.pref$webp $uri.pref$avif $uri$webp $uri$avif $uri /?fw-webp-avif-ondemand=all; } location ~* cache/fastware\-webpavif.+\.webp$ { add_header Vary Accept; try_files $uri$png /?fw-webp-avif-ondemand=png; } location / { root /var/www/wordpress; index index.php; try_files $uri $uri/ /index.php?$args; client_max_body_size 30m; location ~ \.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php8.0-fpm-wordpress.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } location ~* .(svg|woff|woff2|ttf|css|js|ogg|ogv|svgz|eot|otf|mp4|rss|atom|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { root /var/www/wordpress; expires max; add_header Cache-Control "public, no-transform"; access_log off; log_not_found off; } location = /robots.txt { root /var/www/wordpress; access_log off; log_not_found off; } location ~ /\. { deny all; access_log off; log_not_found off; }
root@******:/etc/nginx/conf.d/********# nginx -t nginx: [warn] could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
But I continue to get Failed to load resource, ERR_TOO_MANY_REDIRECTS
Forum: Plugins
In reply to: [WebP + AVIF converter] Too Many RedirectHello
I see that on plugin pageroot@host:/var/www/wordpress# ls wp-content/cache/fastware-webpavif plugins uploads
Directory exists
Forum: Plugins
In reply to: [WebP + AVIF converter] Too Many RedirectThe issue seams to be caused by wordpress, he is doing the redirection:
root@*******:/etc/nginx/conf.d/www.*****.com.d# curl -I https://www.*******.com/wp-content/uploads/2022/11/metiss-logo-compress.webp HTTP/2 302 server: nginx date: Sat, 13 May 2023 06:31:13 GMT content-type: text/html; charset=UTF-8 x-sso-wat: You've just been SSOed x-redirect-by: WordPress location: /wp-content/uploads/2022/11/metiss-logo-compress.webp content-security-policy: upgrade-insecure-requests x-content-type-options: nosniff x-xss-protection: 1; mode=block x-download-options: noopen x-permitted-cross-domain-policies: none x-frame-options: SAMEORIGIN permissions-policy: interest-cohort=() strict-transport-security: max-age=63072000; includeSubDomains; preload
Forum: Plugins
In reply to: [WebP + AVIF converter] Too Many RedirectYes I also added missing avif mimetype , here is main conf
mmap $http_upgrade $connection_upgrade { default upgrade; '' close; } map $http_accept $webp { default ".nonexisting"; "~*image/webp" ".webp"; } map $http_accept $png { default ".png"; "~*image/webp" ""; } map $http_accept $avif { default ".nonexisting"; "~*image/avif" ".avif"; } server { listen 80; listen [::]:80; server_name www.rhum-www.com; access_by_lua_file /usr/share/ssowat/access.lua; include /etc/nginx/conf.d/acme-challenge.conf.inc; location ^~ '/.well-known/ynh-diagnosis/' { alias /tmp/.well-known/ynh-diagnosis/; } location ^~ '/.well-known/autoconfig/mail/' { alias /var/www/.well-known/www.rhum-www.com/autoconfig/mail/; } location / { return 301 https://$http_host$request_uri; } include /etc/nginx/conf.d/yunohost_http_errors.conf.inc; access_log /var/log/nginx/www.rhum-www.com-access.log; error_log /var/log/nginx/www.rhum-www.com-error.log; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name www.rhum-www.com; include /etc/nginx/conf.d/security.conf.inc; ssl_certificate /etc/yunohost/certs/www.rhum-metiss.com/crt.pem; ssl_certificate_key /etc/yunohost/certs/www.rhum-metiss.com/key.pem; more_set_headers "Strict-Transport-Security : max-age=63072000; includeSubDomains; preload"; # OCSP settings ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate /etc/yunohost/certs/www.rhum-www.com/crt.pem; resolver 127.0.0.1 127.0.1.1 valid=300s; resolver_timeout 5s; location ^~ '/.well-known/autoconfig/mail/' { alias /var/www/.well-known/www.rhum-www.com/autoconfig/mail/; } access_by_lua_file /usr/share/ssowat/access.lua; include /etc/nginx/conf.d/www.rhum-www.com.d/*.conf; include /etc/nginx/conf.d/yunohost_sso.conf.inc; include /etc/nginx/conf.d/yunohost_admin.conf.inc; include /etc/nginx/conf.d/yunohost_api.conf.inc; include /etc/nginx/conf.d/yunohost_http_errors.conf.inc; access_log /var/log/nginx/www.rhum-www.com-access.log; error_log /var/log/nginx/www.rhum-www.com-error.log; }ain conf file
NB: domain name has been modified for privacy
- This reply was modified 1 year, 6 months ago by andrelauret23.
- This reply was modified 1 year, 6 months ago by andrelauret23.
Viewing 4 replies - 1 through 4 (of 4 total)