1

I just want to create multi-website, i read some links to guide me to create a subfolder and create symbolic links of app,pub,lib,var and copy index.php & .htaccess from root folder to a subfolder.

Here where i can create a subfolder Root folder or Pub folder?

This guide leads to create under Root folder => https://meetanshi.com/blog/setup-magento-2-multi-store/

This guide leads to create under Pub folder => https://magento.stackexchange.com/a/198257/57334

Which one should I follow?

And how to add my localhost URL to my Nginx configuration, most of the documents and online links teach only live URL.

My single store Nginx Configuration :

server {
listen 8087;
server_name gomart;
set $MAGE_ROOT /usr/share/nginx/html/gomart;
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;
set $MAGE_RUN_TYPE website;
}

upstream fastcgi_backend2 {
server 127.0.0.1:9000;
}
1

You can follow Meetanshi's link as it is tried, tested, and approved in local as well as three live websites too.

Thank you.

| improve this answer | |
  • After completed all the steps, how to configure Nginx? My current Nginx => justpaste.it/7bkdv How to configure multi-website? My seconf store url : http: //192.168.1.64:8080/grocery – zus Jun 30 at 5:59
  • Root folder path : usr/share/nginx/html/gomart/ :: Subfolder path : usr/share/nginx/html/gomart/grocery > Index. php => justpaste.it/9q5m7 & .htaccess => justpaste.it/2vprh & symbolic links of app, pub, lib, var – zus Jun 30 at 6:05
  • MULTI WEBSITE URL => 192.168.1.65:8087/grocery 404 error screenshot => snipboard.io/kydph2.jpg – zus Jun 30 at 6:26
  • Any help for setup LEMP localost Multi Website url to nginx configuration? Nginx : justpaste.it/8d5xm Main website : Path - usr/share/nginx/html/gomart, URL - 192.168.1.65:8087/ Multi-website : URL - 192.168.1.65:8087/grocery/ – zus Jul 1 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.