How do I make my Apache2 server work?
I have set up apache2 web server according to Documentation, trying to follow it exactly. However, I get the following error when trying to access it from any machine connected to Internet:
The requested URL / was not found on this server.
Apache/2.4.29 (Ubuntu) Server at foo.foo.xxx Port 80
Apparently DNS is OK because the server was found, I can also ping the same server. My registered domain is foo.xxx and my domain provider has DNS pointing to the IP of linode virtual server foo.foo.xxx. What am I missing?
3 Replies
Given that your Apache server is throwing that error, it looks like it's running properly, but there's some issue with your configuration files. We recommend reviewing our Apache Configuration Basics guide, as well as Virtual Host configuration suggestions in our LAMP Stack on Ubuntu 18.04 guide.
Feel free to post your current Virtual Host configurations if you want more help with troubleshooting.
Perfect, thx! The problem was "_" instead of "." characher in my site specific configuration file. The way I found it out by running
sudo apachectl -t
showing that the document root directory did not exit.
One wrong character…