I have a website in IP format like 12.34.56.78
with multi-website like this -
12.34.56.78/dev1
12.34.56.78/dev2
12.34.56.78/dev3
12.34.56.78/dev4
I created Folder in Magento root directory dev1,dev2,dev3 & dev4 and inside that folder, I add index.php,.htaccess file, and symlinks of app, lib, pub & var.
All is working fine.
Now I point IP to Domain name, Main website abc.com is perfectly working fine but
abc.com/dev1
abc.com/dev2
abc.com/dev3
abc.com/dev4
is not working when I open abc.com/dev1 website open but CSS, JS, and images not loading.
Does anyone know how to solve this?
-
check console you get more idea, why its not loading,Mage2 Developer– Mage2 Developer2020年01月30日 12:42:18 +00:00Commented Jan 30, 2020 at 12:42
-
@Yogesh it showing net::ERR_ABORTED 403 (Forbidden)sumeet bajaj– sumeet bajaj2020年01月30日 12:44:36 +00:00Commented Jan 30, 2020 at 12:44
-
remove symlinks for one website and create againMage2 Developer– Mage2 Developer2020年01月30日 12:45:19 +00:00Commented Jan 30, 2020 at 12:45
-
do you have idea how to remove symlinks ?sumeet bajaj– sumeet bajaj2020年01月30日 12:49:46 +00:00Commented Jan 30, 2020 at 12:49
-
go that folder and delete that and recreate it.Mage2 Developer– Mage2 Developer2020年01月30日 12:52:15 +00:00Commented Jan 30, 2020 at 12:52
1 Answer 1
Finally, I found a solution
I've www.abc.com pointing to my doc root where the code base lives. In the doc root, I've got a subdir named dev1. In Magento, I've created a new website and set the base URLs for the new website to www.abc.com/dev1/. I need to set the static and media files base URLs to 'www.abc.com/pub/static/' and 'www.abc.com/pub/media/', respectively, otherwise the css and js was not loading.
Refrence - https://gist.github.com/thagxt/0f605f0a8a95c79302db0d2f04383788
Explore related questions
See similar questions with these tags.