2016-05-09 6 views

答えて

0

を禁止されていることを私に語ったモノといくつかの問題を抱えているのではい、あなたはこれを行うことができますが、本当にこのライブ/本番サイトです場合は特に、お勧めしません。単純に、ルートパスのautoindexをallに設定する必要があります。 geoとif文でアドレスリストを設定します。

geo $allow_addresses { 
    default 0; 
    144.0.0.0/24 1; 
} 

    server { 
      listen 80; 
      server_name domain.com www.domain.com; 
      access_log /var/log/access.log; 
      root /path/to/root; 
      location/{ 
        index index.php index.html index.htm; 
      } 
      location/{ 
       if ($internals) { 
        autoindex on; 
       } 
      } 

    } 
+0

これは役に立ちましたか? – CareFree

関連する問題