Hi, I hope the subject of this thread already gives you a hint about what I want to ask. Situation: ISPConfig3, the webserver, Letsencrypt, all working fine. Now I have this rewrite rule for Wordpress: Code: if (!-e $request_filename) { rewrite ^(.+)$ /index.php?q=$1 last; } And this prevents Letsencrypt from automatically renewing the certificate. The routine is now to deactive the rewrite rule, renew the cert by disabling and enabling Letsencrypt in ISPConfig, then reenabling the rewrite rule.... not the way it's meant to be, actually... My question to anyone with more nginx/rewrite powers: could there be a way to modify this rewrite rule to make Letsencrypt work?
Use this instead: Code: location / { try_files $uri $uri/ /index.php$is_args$args; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; access_log off; log_not_found off; } That's the Nginx rewrite rule that is recommended by WordPress and it works fine on ISPConfig servers as well.
thanks, Till, but any of these gives me this error. using ISPConfig Version: 3.1.13, nginx/1.10.3, Ubuntu 16.04.6 LTS
Does this document help? https://codex.wordpress.org/Nginx Found that among others using Internet Search Engines with Code: Nginx rewrite rule that is recommended by WordPress
Taleman, sadly not. Been on that page to see if I got anything wrong in those rewrite rules, but they are exactly as Till wrote :/ also https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/ where does IPSConfig know from that rules are wrong? test run of nginx with -t? would like to know the actual error then...
The rules I posted are for the nginx directives field in ispconfig, that field is on the options tab of the website. I guess you posted it into the rewrite rule field on the redirects tab and not into the nginx directives field.