cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3 - Setup Multi Website Centos 7 - Nginx

Highlighted

Magento 2.3 - Setup Multi Website Centos 7 - Nginx

Install magento 2.3.4 on centos 7 - nginx localhost,

  • Root folder - usr/share/nginx/html/gomart

  • Created subfolder inside the root folder along with symbollice link of app, lib, pub, var and copy index.php & .htaccess from root folder to subfolder index.php, .htaccess - usr/share/nginx/html/gomart/grocery

Website 2 configure by this tutorial

after that setup etc/site-enabled & etc/nginx/conf.d/mgento.conf

following Magento docs [ To use one virtual host (simplified)]

 

map $http_host $MAGE_RUN_CODE {
    default '';
    gomart/grocery grocery;
}

server {
    listen 8087;
    server_name gomart gomart/grocery;
    set $MAGE_ROOT /usr/share/nginx/html/gomart;
    set $MAGE_RUN_TYPE website;
    include /usr/share/nginx/html/gomart/nginx.conf.sample;

    error_log /usr/share/nginx/html/gomart/gomart_error.log;
    access_log /usr/share/nginx/html/gomart/gomart_access.log;
}

upstream fastcgi_backend2 {
        server  127.0.0.1:9000;
}

 

1 REPLY 1
Highlighted

Re: Magento 2.3 - Setup Multi Website Centos 7 - Nginx

Hi @Aveeva 

Kindly refer below link :

https://devdocs.magento.com/guides/v2.4/install-gde/prereq/nginx.html

It may help you to setup NGINX setup like etc/site-enabled & etc/nginx/conf.d/mgento.conf

If issue resolve, please click on 'Kudos' & Accept as Solution!