Redirect DNS only works for www/html, not for www/html/website

Hello. I have a domain registered with Godaddy.com and I want to have the hosting here on Linode. I redirected the domain as tutorials on Linode said. The problem is that now, if you visit the http://mydomain.com link, only the Ubuntu root folder (www/html) appears.
I also addded the website configuration file into the sites-avilable directory with the <directory> matching the correct path (www/html/mywebsite) but it still does not work.</directory>

How can I correctly point my domain the correct location of the website?

My thought is that I registered here on Linode DNS as default, only leaving the ip address, without adding the subfolder in the path. Should I do that?

Thanks in advance.

Cloud Manager Version: 0.61.0

1 Reply

Hey there,

The DNS record does not need a subfolder in your entry to point to the correct path.

It seems to me like your virtual hosts file or your website configuration file may be misconfigured.

Here are a couple Docs Guides to make sure you've got everything setup properly:

Configure Virtual Hosts
Here is an example of a properly configured vhosts file:

<VirtualHost *:80>
     ServerAdmin webmaster@example.com
     ServerName example.com
     ServerAlias www.example.com
     DocumentRoot /var/www/html/example.com/public_html/
     ErrorLog /var/www/html/example.com/logs/error.log
     CustomLog /var/www/html/example.com/logs/access.log combined
     <Directory /path/to/public/website/>
        Require all granted
     </Directory>
</VirtualHost>

Apache Configuration Basics

I really think that one of those two files is the culprit. If you check them and can't figure out the issue, please paste the sanitized contents and we can dig a bit deeper.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct