Welcome! Log In Create A New Profile

Advanced

.htaccess style support in existing nginx

October 25, 2012 02:08AM
First, we can use "watch/monitor" files in linux for changes and execute some command based on it.

Now, for a site lets put a ".nginxaccess" file to hold site specific configuration (file will be writable by PHp, etc so web-site can update it)

Then we can put in main site config "include $documentroot/.nginxaccess"

And also start a daemon to watch "/var/www/path/to/site/.nginxaccess". Whenever any changes are detected in "/var/www/path/to/site/.nginxaccess" we can test nginx config and reload it.

I will be giving this a try to see what issues I may face...

Please give your suggestions/opinion/alternative approach...


Goal is to allow wordpress like web-apps to update a site-specific nginx config file AND have nginx auto-reloaded new config.

--
Rahul Bansal
EasyEngine - https://github.com/rtCamp/easyengine
Subject Author Posted

.htaccess style support in existing nginx

rahul286 October 25, 2012 02:08AM

Re: .htaccess style support in existing nginx

Andre Jaenisch October 25, 2012 05:50AM

Re: .htaccess style support in existing nginx

rahul286 October 25, 2012 06:02AM

Re: .htaccess style support in existing nginx

Jonathan Matthews October 25, 2012 07:58AM

Re: .htaccess style support in existing nginx

rahul286 October 25, 2012 08:51AM

Re: .htaccess style support in existing nginx

rahul286 October 25, 2012 08:57AM

Re: .htaccess style support in existing nginx

Andre Jaenisch October 26, 2012 04:22AM

Re: .htaccess style support in existing nginx

rahul286 October 26, 2012 04:38AM

Re: .htaccess style support in existing nginx

Jonathan Matthews October 26, 2012 06:02AM

Re: .htaccess style support in existing nginx

rahul286 October 26, 2012 07:43AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
Record Number of Users: 6 on August 08, 2016
Record Number of Guests: 386 on August 02, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready