I’m using NGINX. Is this plugin only for use with Apache servers?
]]>I enabled rewrite for file optimizer on NGINX and I added into Additional nginx directives on Plesk these config:
location /_static/ {
fastcgi_pass unix:/var/run/fastcgi.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/wp-content/plugins/powered-cache/includes/file-optimizer.php;
}
But I get error 404 on file resources…why?
O.S. Debian 12
NGINX v1.26.2
Thanks
]]>if ( $http_accept ~ "image/webp" ) {
set $webp .webp ;
}
location ~* (.*)\.(?:png|jpe?g|gif)$ {
if ( -f $document_root$1.webp ) {
set $webp serve$webp ;
}
if ( $webp = "serve.webp" ) {
return 301 '$1.webp';
}
}
I had also tried this code, which is more efficient, but unfortunately it didn’t work for me:
if ( $http_accept ~ "image/webp" ) {
set $webp '.webp' ;
set $type 'image/webp';
}
location ~* \.(png|jpe?g|gif)$ {
add_header Vary Accept;
add_header X-Type "static/known";
add_header Cache-Control "public, max-age=2592000";
add_header Vary "Accept-Encoding";
add_header Access-Control-Allow-Origin *;
add_header content-type $type;
default_type '$type';
try_files $uri$webp $uri =404;
}
]]>Overall a great plugin!
]]>Add it to fstab and you have a persistent connection.
]]>My site has some SVGs. They work fine on the original site, but when restoring on a new domain from an UpdraftPlus back, all those SVGs fail with a server 403 “forbidden” error.
Even weirder than that is that any new SVG I upload after the restore does work! Huh?
I checked my file and folder permissions and owners via SSH and didn’t see any difference. They both have the same permissions, same owners, same group. But no matter what, the SVGs from the restore won’t load—not even opening their URLs directly! But new SVGs load just fine!
I’ve also already tried disabling all plugins and switching to a default theme and that doesn’t change anything.
Any ideas what to check further or how to fix this?
]]>Unfortunately now it’s no longer possible to crop an image at all. After choosing the crop in the image when hitting the blue crop button (“Zuschnitt übernehmen”) a popup shows up with the message that there was an error connecting to the server (“Fehler beim Verbindungsaufbau zum Server.”)
Everything worked fine before the update, no server changes were made.
Hope this can be adressed quickly, so we can get back to using this great plugin.
]]>In the logs I see that:
517738#0: *9222316 openat() “/var/www/vhosts/****.online/httpdocs/wp-json/webp-converter/v1/cron-conversion” failed (2: No such file or directory)
Also webp not generated. Plugin has latest version.
]]>Currently, the WP Statistics plugin attempts to create a .htaccess
file to restrict public access to certain directories. This functionality leads to increased costs due to the repetitive creation of the .htaccess
file, impacting users regardless of whether they are using Apache or Nginx.
To accommodate all users, it would be beneficial to implement a way to disable this functionality. Possible options include:
.htaccess
file..htaccess
file.Acceptance criteria
.htaccess
file..htaccess
file remains unchanged.How To Test
.htaccess
file creation..htaccess
files created in the specified directory before and after the change.References
]]>server {
listen 80;
server_name tkskkladno.cz www.tkskkladno.cz;
# Redirect all HTTP requests to HTTPS
# return 301 https://$host$request_uri;
location / {
proxy_pass https://carrot.melonhost.cz:25573; # Replace with your backend server address
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 443 ssl;
server_name tkskkladno.cz www.tkskkladno.cz;
ssl_certificate /etc/letsencrypt/live/tk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tk/privkey.pem;
location / {
proxy_pass https://carrot.melonhost.cz:25573; # Replace with your backend server address
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name tkskkladno.cz www.tkskkladno.cz;
# Redirect all HTTP requests to HTTPS
# return 301 https://$host$request_uri;
location / {
proxy_pass https://carrot.melonhost.cz:25573; # Replace with your backend server address
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 443 ssl;
server_name tkskkladno.cz www.tkskkladno.cz;
ssl_certificate /etc/letsencrypt/live/tk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tk/privkey.pem;
location / {
proxy_pass https://carrot.melonhost.cz:25573; # Replace with your backend server address
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
]]>