1. Trường hợp code để trong public_html (root)

Mã:
location / {
            index index.php index.html index.htm;
            try_files $uri $uri/ /index.php?$uri&$args;
       
        }
        location /internal_data/ {
        internal;
        allow 127.0.0.1;
        deny all;
        }

        location /library/ {
        internal;
        allow 127.0.0.1;
        deny all;
        }
2. Trường hợp code để trong thư mục forum


Mã:
 location /forums/ {
            index index.php index.html index.htm;
            try_files $uri $uri/ /forums/index.php?$uri&$args;

        }

        location /forums/internal_data/ {
        internal;
        allow 127.0.0.1;
        deny all;
        }

        location /forums/library/ {
        internal;
        allow 127.0.0.1;
        deny all;
        }

Đăng nhận xét Blogger

 
Top