如果 shopware 在根目录中,我有以下 nginx 配置可以正常工作。但我想将所有文件都放在 /shop 目录中。我将位置 / 更改为 /shop/ 但这不起作用。
有人知道我如何告诉 nginx shopware 在子目录 /shop 中吗?
location ~ /(engine|images/[a-z]+|files|templates)/ {
}
location / {
index index.html index.php shopware.php;
rewrite shopware.dll /shopware.php;
rewrite files/documents/.* /engine last;
rewrite images/ayww/(.*) /images/banner/$1 last;
rewrite backend/media/(.*) /media/$1 last;
if (!-e $request_filename){
rewrite . /shopware.php last;
}
}
location ~ \.(tpl|yml|ini)$ {
deny all;
}
location /install/ {
location /install/assets {
}
if (!-e $request_filename){
rewrite . /install/index.php last;
}
}
location /update/ {
location /update/assets {
}
location /update/templates {
}
if (!-e $request_filename){
rewrite . /update/index.php last;
}
}
location /recovery/install/ {
location /recovery/install/assets {
}
if (!-e $request_filename){
rewrite . /recovery/install/index.php last;
}
}
location /recovery/update/ {
location /recovery/update/assets {
}
if (!-e $request_filename){
rewrite . /recovery/update/index.php last;
}
}
location @php { ##merge##
#fastcgi_buffer_size 128k;
#fastcgi_buffers 256 16k;
#fastcgi_busy_buffers_size 256k;
#fastcgi_temp_file_write_size 256k;
fastcgi_temp_file_write_size 10m;
fastcgi_busy_buffers_size 512k;
fastcgi_buffer_size 512k;
fastcgi_buffers 16 512k;
fastcgi_read_timeout 1200;
}