Post by Joe1234 » Sun Mar 24, 2024 6:09 am

I'm offloading a bunch of permanent things to nginx config instead of htaccess to improve performance and decrease the recursive lookups with every page. One issue I'm having is that nginx doesn't seem to be taking commands that involve denial of access or ip. Is this something that would have been set in the main nginx or something else by the host? Or is what I have incorrect coding?

Code: Select all

# DENY DIRECT ACCESS TO THESE EXTENSIONS
location ~\.(tpl|twig|ini|psd|txt|log|sh)$ {
  deny all;
  #return 404;
}

Code: Select all

# DENY ACCESS TO FILES THAT START WITH "."
location ~ ^\. {
  deny all;
}

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by paulfeakins » Mon Mar 25, 2024 8:39 pm

Joe1234 wrote:
Sun Mar 24, 2024 6:09 am
I'm offloading a bunch of permanent things to nginx config instead of htaccess to improve performance and decrease the recursive lookups with every page.
Do you have any links that show this is more performant?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 20 guests