Getting to grips with nginx and how to deal with dynamic IPs access?
February 20, 2012 01:58PM
Hi everyone,

I have just made the switch from running my site on apache, over to nginx. And so far I'm loving it, the performance boost is definetly noticeable. Now I have a few questions:

1, I have converted my htaccess rules into a config for the vhost, however there seems to be a lot of repeating, so I'm looking to see if its possible to condense it down. For example, I have multiple directories I want to block a list of extensions for, at the moment I have a location for every location and then the list of denied extensions for every location. I have then had to repeat all of these again in the SSL "version" of the server.

2, With apache, I used to specify htaccess rules which only permitted certain IPs to an admin directoy. Although I have this working on nginx, the IPs are dynamic IPs, and I used to run a script via cron which would update the htaccess files with the current dynamic ip after performing a lookup on a dyndns hostname. Is there anyway to permit dynamic IPs on nginx, or will i have to also get the script to restart nginx every time too?

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 321
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready