nginx - Apply "autoindex on;" only at root of folder and index documents at following subfolders -
what i'd apply autoindex on;
@ root folder , afterwards (as user selects folder) use traditional "index.php" files if available , defined in index index.html index.htm...
etc. don't know number of folders inside root neither names. how can done, given these restrictions?
you can define regular expression location match uri below root, example ./
this block should placed below location ~ \.php$
(or similar) php scripts continue handled correctly. see this document.
location / { autoindex on; } location ~ \.php$ { ... } location ~ ./ { index index.php; }
Comments
Post a Comment