Verschachtelte Standorten in nginx

Hallo, ich versuche die folgenden zu arbeiten!

Ich bin im Grunde versucht, zu erlauben, die folgenden URLs übergeben werden, die proxy_pass Direktive durch diese beiden URLS:

http://example.com/admin/1 oder http://example.com/admin/2/

Ich habe die folgende config:

location /admin/{

        # Access shellinabox via proxy
        location 1/{
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_pass http://example.com;
        }

}

Im moment, wird ein Fehler geworfen:

2016/01/17 15:02:19 [emerg] 1#1: location "1/" is outside location "/admin/" in /etc/nginx/conf.d/XXX.conf:37
nginx: [emerg] location "1/" is outside location "/admin/" in /etc/nginx/conf.d/XXX.conf:37
InformationsquelleAutor geekscrap | 2016-01-17
Schreibe einen Kommentar