보탑 패 널 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;
}
어떻게 설정 합 니까? 사이트 관리 → 의사 정적, 위의 코드 를 복사 하면 됩 니 다. 그 다음 에 저장 하거나 새로운 템 플 릿 으로 저장 합 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다: