diff --git a/images/nginx/Dockerfile b/images/nginx/Dockerfile index 898ee450..422c3ffb 100644 --- a/images/nginx/Dockerfile +++ b/images/nginx/Dockerfile @@ -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} \ diff --git a/images/nginx/etc/nginx/available.d/magento2.conf b/images/nginx/etc/nginx/available.d/magento2.conf index eff0707d..c2d84bc3 100644 --- a/images/nginx/etc/nginx/available.d/magento2.conf +++ b/images/nginx/etc/nginx/available.d/magento2.conf @@ -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"; diff --git a/images/nginx/etc/nginx/conf.d/http.conf b/images/nginx/etc/nginx/conf.d/http.conf new file mode 100644 index 00000000..33356890 --- /dev/null +++ b/images/nginx/etc/nginx/conf.d/http.conf @@ -0,0 +1,8 @@ + + map $http_host $magento_multistore_key { + default ''; + } + + map $http_host $magento_multistore_type { + default store; + }