4 ms·
Trust me, I was just surprised as you are when I saw tutorials suggesting this.
by TarqDirtyToMe 10y ago
Trust me, I was just surprised as you are when I saw tutorials suggesting this.
- mschuster91 10y agoBecause nginx AFAIK does not have something like Apache's .htaccess. Yes, htaccess is ugly but at least a server operator can restrict the users from pwning the machine and only allow rewrite-configs.
- Karunamon 10y agoThat is exactly the reason. and is the main difference between Apache mode and Nginx mode in W3TC. The plugin needs to be able to create URL rewriting rules on the fly, and nginx gives them no sane way to do it. Htaccess sucks for various reasons, but most of the suck can be worked around.
- zzzcpan 10y agoWhat exactly does it do on the fly? Unless the plugin is running under the same user as nginx's master process, which is usually root, it won't be able to send SIGHUP to the master process and reload nginx.conf. So, nothing can be on the fly here, it's probably just one of those fancy ways to make plugin installation "easier" and create configs on behalf of the user. Also, there is no reason to start nginx under root on linux, just give the binary required net bind capability and start under normal user.
- PuffinBlue 10y agoUsually in many simple hosting setups (where W3TC is common) the reloading of nginx is left to a cron job at some set interval. Other plugins like iThemes Security will populate the nginx.conf with banned IP and the such, so it can update on a fairly regular basis.
- rgj 10y agonginx map files are a sane and fast way to create URL rewriting rules. http://serverfault.com/questions/441235/maintaining-redirects-in-nginx-from-an-external-source http://serverfault.com/questions/441235/maintaining-redirect...