When deactive proxy nginx in a domain the SSL fail

When disabling the nginx proxy on a domain the SSL fails, they say that the certificate is invalid.

I need nginx to let serve static files because I have some rules in .htaccess to make files in certain directories private (require login) that nginx bypasses.

Don’t disable proxy as it still uses Nginx to redirect but only the default template for IP and it breaks for everything else. htaccess protection still works when nginx proxy is enabled.

The rule is this:

RewriteCond %{REQUEST_URI} statics/uploads/documents/.+
RewriteRule . index.php [L]

On my local works normally, I noticed that when uploading to the server it was not working and for a few moments I did not know the reason. Looking at the response headers in “server” the value was “nginx”, i.e. they are being delivered those files by nginx and ignore the rule in .htaccess

However, I found a possible solution (it worked for me although I am not sure if it is the best): In the textbox “Proxy Extensions” of the domain configuration I saved it empty and it does not deliver the statics by nginx anymore. I would still prefer a way for nginx to not just bypass .htaccess.

Translated with www.DeepL.com/Translator (free version)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.