Wildcard docroot?

Aapo Talvensaari aapo.talvensaari at gmail.com
Thu Jan 19 01:11:21 UTC 2017


On Wed, Jan 18, 2017 at 10:52 PM, Daniel <daniel at linux-nerd.de> wrote:

> Hi there,
>
> i wanted to try something like a Wildcard DocRoot:
>
>
>  server {
>         listen 80;
>         root /var/www/branches/*/current/web/;
>         server_name auto.deploy.fcse.int;
>


I use this:

server {
    listen                [::1]:80 default_server deferred reuseport
so_keepalive=on ipv6only=on;
    listen                127.0.0.1:80 default_server deferred reuseport
so_keepalive=on;
    server_name           ~(?<site>[^\.]+)\.dev$;
    root                  /Users/bungle/Sites/$site/html;
    index                 index.php;
    # ...
}

I'm sure you can figure out from there.


Regards
Aapo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170119/d1a25225/attachment-0001.html>


More information about the nginx mailing list