Access subdomain folder directly from IP address

2

I have server located under X.Y.Z.C IP address. It runs Apache2. I've added additional domain to it, let us call it A. When I want to add something to it, I have to send files to A subdirectory in public_html. However I want to test my website, before I change DNSes to my server. My question is: how can I access files of domain A? I tried to visit http://X.Y.Z.C/A/ but met "404" error. How can I access folder of my domain directly from IP address? Of course IP is different than X.Y.Z.C and domain isn't "A".

TN888

Posted 2015-02-23T10:44:55.820

Reputation: 103

Answers

0

Veru first thing you need to check is the DocumentRoot for X.Y.Z.C. You can check it in the apache conf file. Then for eg. you find it to be /home/xyz/public_html/any_folder, you would need to place the sub-directory inside /home/xyz/public_html/any_folder. Then you can try checking http://x.y.z.c/A/.

If this does not help, please check the apache error logs and post it here.

S R

Posted 2015-02-23T10:44:55.820

Reputation: 195

I am really sorry, I was wrong. I dont have access to shell. My server/hosting is provided by Hetzner... I do not have any way to check this... – TN888 – 2015-02-23T11:17:15.613

Do you have access to cPanel? – S R – 2015-02-23T11:22:40.690

Yes I do have it – TN888 – 2015-02-23T11:29:43.253

Visit http://x.y.z.c/A/ & check the error log from cpanel. Let me know what it says.

– S R – 2015-02-23T11:37:14.607