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 {

1 Answer 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.

  • 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: //
    – zus
    Commented Jun 30, 2020 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
    Commented Jun 30, 2020 at 6:05
  • MULTI WEBSITE URL => 404 error screenshot => snipboard.io/kydph2.jpg
    – zus
    Commented Jun 30, 2020 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 - Multi-website : URL -
    – zus
    Commented Jul 1, 2020 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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