Page 1 of 1

Help with settting up a subdomain

Posted: Fri Aug 10, 2018 3:19 pm
by dottomm@gmail.com
Hello Everyone.

I am having a hard time setting up a subdomain for my Sonic Custom hosting site.

I've gone into the member tools ->Edit DNS -> and add a CNAME 'test.domain.org' and under 'record' added 'domain.org/test'

But I am not getting the results I am looking for.
Can someone point me in the right direction?

thanks in advance,

Re: Help with settting up a subdomain

Posted: Fri Aug 10, 2018 5:43 pm
by joemuller
Hi Tom,

CNAME records unfortunately do not work like that - they can only point at another host. That said, I tracked down which site you were talking about via our logs, so I'll get something in place for you shortly. You'll want to point test.domain.com at the same IP address as domain.com - we'll set up what's called a Virtual Host to respond with the testing version if one navigates to test.domain.com instead of the usual domain.com.

-- Joe M.
Sonic System Operations

Re: Help with settting up a subdomain

Posted: Mon Aug 13, 2018 10:12 am
by dottomm@gmail.com
Thank you very much Joe,
I can see the directory and the index pages. Due to the 'test' directory being outside the 'webroot/html' directory it seems the PHP isn't working. I've tried making changes to the .htaccess file but was unsuccessful.

Do I need to edit the PHP.ini file? I don't want to break the non-test site. Any suggestions?

Thanks in advance.

-Tom

Re: Help with settting up a subdomain

Posted: Mon Aug 13, 2018 10:55 am
by joemuller
dottomm@gmail.com wrote: I can see the directory and the index pages. Due to the 'test' directory being outside the 'webroot/html' directory it seems the PHP isn't working. I've tried making changes to the .htaccess file but was unsuccessful.

Do I need to edit the PHP.ini file? I don't want to break the non-test site. Any suggestions?
You shouldn't need to make any changes to the php.ini file. That said, make sure your .htaccess file is the same for both sites, *but* that any full URLs in it point to test.domain.com instead of www.domain.com.

Also, this isn't needed under PHP 7:

Code: Select all

AddHandler php5-script .php
If it's more convenient for you, send an email over to support@sonic.net and put 'ATTN: Joe Muller' in the subject, along with the domain name - sometimes email discussion works better for tracking down subtle issues like what you're seeing.

-- Joe M.
Sonic System Operations