On 10.04.18 22:24, Mischa wrote:
Hi All,

Is there a way to serve both static and dynamic content, eg. index.html and 
index.php within the same server { } definition?
I am looking for something like:

server "default" {
     listen on $ext_addr port 80
     root "/htdocs"
     directory index "index.html" # not needed as it's the default
     location "/files/*" {
         root "/htdocs/files"
         directory auto index
     }
     location "^/phpapp/*" {
         root "/htdocs/phpapp"
         directory index "index.php"
         fastcgi socket "/run/php-fpm.sock"
     }
}

Is it possible at all or do I need split static and dynamic content based on 
server { }?

Seems like it should work exactly as you have written.
if not you should show more then you've shown.

Reply via email to