How to setup multi store on localhost?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
Hi,
Can anyone help to setup multi store on localhost?
Thank you
10 years ago
See here and here
10 years ago
a.m. wrote:
See here and here


Thank you
8 years ago
a.m. wrote:
How can it be set up on localhost?
It can be set up with Windows hosts file.

1. Add the following line to hosts file:
127.0.0.1       testhost1
127.0.0.1       testhost2

2. Run the site from Visual Studio and configure two stores in nopCommerce admin area. Set the HOST values of the first store to "testhost1:15536" and set it to "testhost2:15536" for the second store. Just replace port number with your one

3. Now open the following URLs in your browser: http://testhost1:15536/ and  http://testhost2:15536/


I did exactly there steps bu I am not able to run multiple stores in nopcommerce 3.5 on localhost with IIS Express. Tried now for several hours :-(

The default shop runs under http://localhost:15536

The host file looks like this:

127.0.0.1       testshop1
127.0.0.1       testshop2

The store settings for store 1 in nopCommers are as follow:

Store URL: http://testshop1:15536/
Host values: testshop1:15536

The store settings for store 2 in nopCommers are as follow:

Store URL: http://testshop2:15536/
Host values: testshop2:15536

The site just gets not found by the browser. What am I doing wrong?
Thanks
7 years ago
(Spanish)

Hola! Amigo

Prácticamente un año después puedo contestar tu pregunta, realmente espero que hayas solucionado tu problema pero dejo aquí la solución por si alguien más pasa por el mismo problema.

Yo estoy usando VS2015 & IIS EXPRESS

1) Primero hacer lo que dicen del archivo Host para hacer que el nombre de la tienda lo responda con 127.0.0.1 (localhost)

2) Hacer que el IIS Express resuelva la petición a el nombre de aplicación en el por el puerto especifico.

Obviamente ya debes tener configuradas las dos tiendas desde la sección de Admin.

Como debe quedar (en mi caso)

HOST
127.0.0.1          testApp1
127.0.0.1          testApp2


IIS EXPRESS
1) El archivo esta en esta ruta $(solutionDir)\.vs\config\applicationhost.config Esta oculto por si no lo vez.

       <sites>
            <site name="nop.Web" id="2">
                <application path="/" applicationPool="Clr4IntegratedAppPool">
                    <virtualDirectory path="/" physicalPath="J:\dev\Presentation\nop.Web" />
                </application>              
                <bindings>
                    <binding protocol="http" bindingInformation="*:55216:localhost" />
              <binding protocol="http" bindingInformation="*:55216:testApp1" />
        <binding protocol="http" bindingInformation="*:55216:testApp2" />

                </bindings>
            </site>          
        </sites>

Haciendo esto funciona perfecto.

Dejo el post esperando que le ayude a alguien más.

Saludos
Atte: JerezKyo
7 years ago
a.m. wrote:
See here and here



Hi, All.

Now, I'm working configuration multi store nopcommerce. I've two store on local

+ store1.com/webshop
+ store2.com/webshop

now, i'm looking for product one store, result return product all store
.
i'm shopping on one store, I want to looking for products one store, not across multiple other store.

what can i do ???

Thank you for reading.
7 years ago
a.m. wrote:
See here and here


i try but not working
what can i do Next...?
7 years ago
a.m. wrote:
See here and here




My Store 1 Is

Store name=Your store name

Store URL=http://localhost:15536/

HOST values=localhost:15536


My Store 2 IS

Store name=Store1

Store URL=http://localhost:15538/

HOST values=localhost:15538


My Host File Is

127.0.0.1       localhost


in applicationhost.config Add This Binding
<binding protocol="http" bindingInformation="http:*:15538:localhost" />

But This Is not Working Help Me....???This Is Possible...?
6 years ago
Hi everyone,
i am facing this same problem,
can someone please help

thanks a lot
6 years ago
- Go to .vs folder
- Go to config folder
- Open applicationhost.config file in notepad or any other editor tool
- Now under Node
"<system.applicationHost> =>  <sites> => <site name="Nop.Web" id="2"> => <bindings>
add new binding with your post and save it.

It will work


<sites>
            <site name="WebSite1" id="1" serverAutoStart="true">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation=":8080:localhost" />
                </bindings>
            </site>
            <site name="Nop.Web" id="2">
                <application path="/" applicationPool="Clr4IntegratedAppPool">
                    <virtualDirectory path="/" physicalPath="E:\Nax\Project Repository\India GST\Presentation\Nop.Web" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:15536:localhost" />
                   <binding protocol="http" bindingInformation="*:15538:localhost" />
                </bindings>
            </site>
            <siteDefaults>
                <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
                <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
            </siteDefaults>
            <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
            <virtualDirectoryDefaults allowSubDirConfig="true" />
        </sites>
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.