How do I Setup Multiple Sites in HostGator Shared Hosting?
Posted
by
cillosis
on Server Fault
See other posts from Server Fault
or by cillosis
Published on 2012-01-30T02:41:28Z
Indexed on
2012/06/13
4:42 UTC
Read the original article
Hit count: 577
I recently decided to consolidate all of my random projects into a single hosting account as it was starting to get very expensive to run each on an individual hosting plan. I purchased the HostGator Baby plan which allows hosting of multiple domains.
You have to set it up with a root domain name which is fine (I used my portfolio domain name). As far as file structure, I wanted a folder for each site in /public_html
so the structure looks like this:
- public_html/
- myportfolio.com/
- ... my files ...
- anothersite.com/
- ... my files ...
- thirdsite.com/
- ... my files ...
I setup add-on domains and pointed them to their respective folders which works fine. My problem is the root domain ex. myportfolio.com
expects it's files to be contained at the root of /public_html
rather than within it's folder I created. I setup a redirect to point requests for myportfolio.com
to myportfolio.com/myportfolio.com/
which works initially except (at least in my WordPress installation) it still references it's root folder as public_html
.
TL;DR; What is the best way to go about setting up multiple site hosting in a shared hosting environment (i.e. I can't setup vhosts). Does anybody know of any tutorials or videos that walk through this more clearly? Thanks.
© Server Fault or respective owner