I have been trying the multi-store setup using latest OC version and have spent more time than I care to admit on getting this to work. I am attempting to get a few stores on one domain using sub-domains, pretty basic stuff really. This is my take on a day spent reading up and attempting to get this right.
The sub domains have been created in the cpanel and are set thus:
subdom1.domain.com (1 to 3)
Document root:
/public_html/domain.com/online/subdom1
/public_html/domain.com/online/subdom2
/public_html/domain.com/online/subdom3
i.e. each of them is a sub domain of http://www.domain.com/online/ where OC is installed and working as it should.
In OC I have the stores set to http://www.domain.com/online/subdom1 etc. however when I click on the ‘storefront’ link or type in the address directly; instead of showing a store I get the a default contents of the folder i.e.
Index of /online/subdom1
• Parent Directory
• cgi-bin/
Some fundamental error going on here that my brain is in meltdown trying to solve… anyone?
Your document root for all of them should be /public_html/domain.com/online/ if that is where you have opencart installed.
Also in opencart's admin settings for each store, be sure you include the ending / - www.domain.com/ NOT www.domain.com
Also in opencart's admin settings for each store, be sure you include the ending / - www.domain.com/ NOT www.domain.com
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Prevent seeing a populated or empty directory listing by inserting -directory directive in basal .htaccess, that'll carry through the trees. Otherwise, it becomes possible not only to see files, but to navigate down and up trees. Don't want that. Apache aliases (set where Apache itself lives) disguise such longstanding basic directories as NON-public "cgi-bin/" so that they're difficult to hack into, and nowadays we often see do-it-yourself "cgi-bin/" directories stuffed into normal public-level trees, where you can guess whom they invite to try to tinker with them.
Who is online
Users browsing this forum: No registered users and 85 guests