nginx with protected forder results in duplicate location

Discussion in 'Installation/Configuration' started by morktadela, Apr 27, 2022.

  1. morktadela

    morktadela New Member


    When i have a domain with protected forlder, ispconfig adds this code to

    location / {
    auth_basic "Members Only";
    auth_basic_user_file /var/www/clients/client1/web148/web/.htpasswd;

    location ~ \.php$ {
    try_files /088917cebe62da4e5a7f9c1304192dfc.htm @php;

    But if i use wordpress or other php frameworks that require this line to work:
    location / {
    try_files $uri $uri/ /index.php?q=$uri&$args;

    i have the error:
    nginx: [emerg] duplicate location "/" in /etc/nginx/sites-enabled/

    Any way to solve this without edit manually?


Share This Page