Search code examples
apacheservervirtualhostubuntu-20.04

How to get Apache to bind correctly to a Virtual Host


I have been working on setting up a website and I am using Apache on a Ubuntu 20.04 LS VM. I have the domain configured to point to the server and https is set up and working but whenever I go to the domain I get this view. Apache Server View

I have tried to get the domain to bind with the virtual host by using the server name tag but that is not working. This is my config file: Apache Config File I am new to the world of running servers so sorry if this question is stupid:). Let me know if I can add anything that would be helpful in this situation. This is the only website I am trying to host on this VM. Also, apache does not think that the folder shown in the image exists in the filesystem. I do not know if this would affect anything but to get my website files on the server I downloaded all the files into backpacking-project. Thanks.


Solution

  • I figured out the reason why it was not working. It was because I uploaded a folder of my files to the server and apache did not recognize it in the filesystem. I uploaded the files separately that that worked.