보탑 패 널 nginx 에 Magento 2 의사 정적 설정

935 단어 Magento2
location / {
            index index.html index.php; ## Allow a static html file to be shown first
            try_files $uri $uri/ @handler; 
            expires 30d;
        }
 
        location /var/export/ { ## Allow admins only to view export folder
            auth_basic           "Restricted"; ## Message shown in login window
            auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
            autoindex            on;
        }
          location  /. { ## Disable .htaccess and other hidden files
            return 404;
        }
 
        location @handler { ## Magento uses a common front handler
            rewrite / /index.php;
        }
 
        location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
            rewrite ^(.*.php)/ $1 last;
        }

어떻게 설정 합 니까? 사이트 관리 → 의사 정적, 위의 코드 를 복사 하면 됩 니 다. 그 다음 에 저장 하거나 새로운 템 플 릿 으로 저장 합 니 다.

좋은 웹페이지 즐겨찾기