Custom Document Root Not Working

Hey,

I have tried setting up a custom root for a domain, as instructed by a script I’m using which claims:

" It is very important that the Document Root of the domain be the same as the public folder found in the public_html of the domain or where script has been installed."

When I do so, the custom domain shows an error:

Internal Server Error

Oops! Something went wrong.

The server encountered an internal error or misconfiguration and was unable to complete your request.

Error Code: 500

After installation, access it via IP+8083 or domain+8083. After logging in, create a www user. Once done, go to the domain settings and add your domain. After that, you can add files to the /home/www/web/my.com/public_html directory.

Hi, thank you for responding.
Kindly note that I am referring to adding a custom domain that points to another domain’s document root. I mean, domain2.com points to the document root of domain1.com. In this case, the reason I want that is because domain1.com is a link shortener website and domain2.com is just a link shortening custom domain and according to the script I am using, adding multiple domains for the case is by pointing them to the document root of where the script is installed, in the public folder. In this case, domain2.com should point to domain1.com/public . But it’s giving internal errors instead of working, it was previously working when I was using a cloud hosting, but since I transferred the websites to vps and using the hestiacp, I am facing the issue of Internal Errors.

I don’t know if it’s appropriate to send a link to documentation of adding a custom domain but the screensnip below might work:

In the image, the addon domain added is meant to work as the domain2.com I am referring above(custom domain).

Note: the image I have provided here is from the script documentation, and appears to be of cpanel. I want to do the same, but on Hestia. Use the image to understand what I want.

This doesn’t look like the Hestia server management panel. Could you tell me what software you are using to manage it?

If you are using Hestia, please follow the following settings!

1 Like

Is the image you provided vstia?

This is cPanel. But as he mentioned, cPanel (his seems to be shared hosting) is able to allow document root to be different (it does as I too have used cPanel), unlike hestia panel. I agree, as the document root changing in HCP is very different compared to cPanel or ISP as well.

What you are showing is custom domain and not custom path. IIAC, both are different things. Root allows to run from a different path (working directory) and domain is redirecting, which is different from what he wishes to achieve.

@briceka mate, download a full extract of cPanel and see its files (if shared hosting). There will be a file with path directives and htaccess as well. I forgot the path directives, but you maybe able to find and implement on your HCP files manually.

Please indicate from the beginning that you are using cPanel,

It ain’t me, it is the OP. I only jumped in as I have cPanel and know of it on a shared hosting.

On your pointer above, I have already tried that way as well, but it fails to load, especially when there is port forwarding turned on, or using nginx as reverse proxy.

Yes I know. I have been using it for ages. Not sure what you are trying to achieve here by showing all this.

What I mean is, if you had clarified from the beginning that you were using cPanel, we wouldn’t have to discuss a bunch of irrelevant stuff here.

Doesn’t cPanel have an official forum? If you think Hestia is good, then use Hestia. Instead of discussing cPanel solutions in a Hestia context! This is really boring! Understand?

Yes, but the OP is not me, he is someone else. I too like you was trying to help here. I use both cPanel & HCP, and know how it works, but I guess OP is new to this. Moreover, I read, he did mention he is using HCP, and gave the way cPanel works as an example in his second post.

The image I had provided is from the scripts documentation. I am using hestia, the image was to help you understand what I wanted to do, but on hestia.

Also, your response has helped me, it’s now working. Thank you

1 Like

The image I provided was from the script I am using, documentation. I wanted to do the same on Hestia.

I realized there’s an option in the Advanced where one can change the document root for a domain, and used it. The problem is now fixed. Your response above helped me locate the part.

1 Like

Hey, I am not using cpanel. I use Hestia, the cpanel image is a screensnip from the video documentation of the author of the script I am using that required pointing a second domain to the primary domain’s route. I am new to Hestia, that’s why I was trying to explain via picturial description to get someone to guide me better and Yunli’s response helped me and now my website is okay, the issue is solved.

1 Like