# How to load nginx config dynamiclly like apache .htaccess?

**URL:** <https://www.ruby-forum.com/t/how-to-load-nginx-config-dynamiclly-like-apache-htaccess/196266>\
**Category:** NGINX\
**Created:** [October 10, 2010, 3:51am UTC](https://www.ruby-forum.com/t/how-to-load-nginx-config-dynamiclly-like-apache-htaccess/196266 "2010-10-10T03:51:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JWD](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c4cdca/32.png) [@JWD](https://www.ruby-forum.com/u/JWD)\
**Post date:** [October 10, 2010, 3:51am UTC](https://www.ruby-forum.com/t/how-to-load-nginx-config-dynamiclly-like-apache-htaccess/196266/1 "2010-10-10T03:51:24Z")

</div>

How to load nginx config dynamiclly like apache .htaccess?  
Many people talk about it, but I still can’t find a way to make it work.

Anather question:  
If I “mv access.log access.log.old”, will access record be logged in  
cache or dropped befor I create a new access.log?  
If logged in cache, how many access record can be logged in cache? After  
cache is full, will access record be dropped?

---

<div class="post-metadata">

**Author:** ![JWD](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c4cdca/32.png) [@JWD](https://www.ruby-forum.com/u/JWD)\
**Post date:** [October 10, 2010, 4:25am UTC](https://www.ruby-forum.com/t/how-to-load-nginx-config-dynamiclly-like-apache-htaccess/196266/2 "2010-10-10T04:25:21Z")

</div>

Yo u cant it requires a stat, just use the main nginx config, if you  
realy  
need .htaccess use “include” and include the file in the zone (not  
dynamic).  
Id recomend just using 1 config file per site, something like  
/etc/nginx/sites/domain.com.conf
