Mobile app version of vmapp.org
Login or Join
Welton855

: How to test a subdomain created with cPanel when using local hosts file entry for that subdomain I'm using Wordpress and Vanilla to run a site with supporting forums. WP is the in the root

@Welton855

Posted in: #Cpanel #Subdomain

I'm using Wordpress and Vanilla to run a site with supporting forums. WP is the in the root folder and vanilla is in the sub-folder 'forum'. This works on my local machine with the following HOSTS file entries:

127.0.0.1 dev.mydomain.com
127.0.0.1 devforum.mydomain.com

I moved all the code up to a VPS and imported the DBs (including minor DB record changes necessary for WP migration). On the VPS, I have used WHM/cPanel to setup mydomain.com and forum.mydomain.com, where the forum software is installed in a sub-folder of the main site. I used cPanel to create the subdomain and selected the correct sub-folder (public_html/forum/).

The following entries in my local HOSTS file to map the VPS's IP address as I do not want global DNS servers to point the domain at my VPS just yet. Here are my local entries:

123.123.123.123 mydomain.com 123.123.123.123 forum.mydomain.com

Wordpress works fine on mydomain.com, but the subdomain is redirecting to a default website page: forum.mydomain.com/cgi-sys/defaultwebpage.cgi

Any thoughts on what I should be checking? I've triple checked everything I can think of, but it's saturday night and I think the coding beers are kicking in..

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton855

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gonzalez347

OK, after testing successfully with a static file, I've figured out that you can't just copy Vanilla to another host and edit the entries to suit. It has to be installed from scratch and the content has to be imported into the tables after install.

There was no error (404s and 500s both point to the CGI default page), so this wasn't obvious, but definitely a case of RTFM.

After I did the re-install, it worked, but I did have to clear all Chrome caches to see it (worked fine in a different browser, BTW).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme