Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Add support of MAGE_RUN_TYPE and MAGE_RUN_CODE param to nginx #192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions images/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV XDEBUG_CONNECT_BACK_HOST '""'

COPY etc/nginx/fastcgi_params /etc/nginx/fastcgi_params.template
COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.template
COPY etc/nginx/conf.d/http.conf /etc/nginx/conf.d/http.conf
COPY etc/nginx/available.d/*.conf /etc/nginx/available.d/

CMD envsubst '${NGINX_UPSTREAM_HOST} ${NGINX_UPSTREAM_PORT} \
Expand Down
3 changes: 3 additions & 0 deletions images/nginx/etc/nginx/available.d/magento2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ location ~ \.php$ {
fastcgi_busy_buffers_size 256k;
fastcgi_read_timeout 3600s;

fastcgi_param MAGE_RUN_CODE $magento_multistore_key;
fastcgi_param MAGE_RUN_TYPE $magento_multistore_type;

fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "max_execution_time=18000";

Expand Down
8 changes: 8 additions & 0 deletions images/nginx/etc/nginx/conf.d/http.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

map $http_host $magento_multistore_key {
default '';
}

map $http_host $magento_multistore_type {
default store;
}