cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-website This site can’t be reached

Multi-website This site can’t be reached

I have setup Magento 2 in WAMP stack.

I have created two virtual hosts.

  1. magento230.com
  2. wateroff-test.net

# magento230.com
<VirtualHost *:80>
   ServerName magento230.com
   ServerAlias www.magento230.com
   DocumentRoot "C:/wamp/www/magento230"
   <Directory "C:/wamp/www/magento230">
       Options +Indexes +Includes +FollowSymLinks +MultiViews
       AllowOverride All
       Require all granted
   </Directory>
</VirtualHost>

# wateroff-test.net
<VirtualHost *:80>
   ServerName wateroff-test.net
   ServerAlias www.wateroff-test.net
   DocumentRoot "C:/wamp/www/magento230"
   SetEnv MAGE_RUN_CODE "wateroff_net"
   SetEnv MAGE_RUN_TYPE "website"
   <Directory "C:/wamp/www/magento230">
       Options +Indexes +Includes +FollowSymLinks +MultiViews
       AllowOverride All
       Require all granted
   </Directory>
</VirtualHost>

Now created two websites in Magento admin.

  1. default website
  2. wateroff website

Wateroff website configuration in admin.

  1. Website name - Water Off (wateroff.net)

    Website code - wateroff_net

    Default store - Wateroff store

  2. Store Information

    Store name - Water Off Store

    Store code - water_off_store

    Root Category - Water off

    Default Store View - US-English(WF)

  3. Store View Information

    Name - US-English(WF)

    Code - wateroff_us

    Status - enabled

When I run url http://magento230.com/ its working fine and http://magento230.com/customer/account/create/ working fine.

BUT

When I run url http://wateroff-test.net/ its not working fine and http://wateroff-test.net/customer/account/create/ gives error like This site can’t be reached.

When i see issue in console it gives me same error for all css and js.

 

Failed to load resource: net::ERR_NAME_NOT_RESOLVED

I already run below command in same manner.

php bin/magento cache:flush 
php bin/magento setup:upgrade
php -dmemory_limit=5G bin/magento setup:static-content:deploy -f

What is the issue here I don't know.

Please help me.

2 REPLIES 2

Re: Multi-website This site can’t be reached

Hello @Hirenshah ,

 

Make sure you have removed magento230.com disable virtual host while accessing http://wateroff-test.net virtual host and also don't forgot to restart service.

 

 

--
If my answer is useful, please Accept as Solution & give Kudos

Re: Multi-website This site can’t be reached

Hello @gelanivishal ,

 

Thanks for the reply.

 

We have multiwebsite store. So we can not disable one virtual host and access other virtual host. We have around 25 websites and want to configure in same one magento 2 instance.

 

We uses WAMP currently. I want to access all website at one time to check whether theme applied or not.

 

Regards

Hiren Shah