Default Apache2 page in Ubuntu: how to identify and resolve the message “It works!”
Do you see the message It works on your Ubuntu server? Learn how to troubleshoot the default Apache2 page and enable your web content in just a few easy steps.
Advertisement
AyudasEconómicas Accem
Do you see the default Apache2 page on your Ubuntu server? Discover how to identify the reason and resolve the message to enable your website.
One of the most common problems when installing an Apache web server on Ubuntu is the appearance of the default page with the message “It works!”. When you access your website and see this message, it means that Apache has been installed correctly, but your project is not visible because the file has not been modified at the beginning. This can be confusing for novice administrators, but it is easy to solve.
The reason why you see this screen is that the file index.html en /var/www/html/ has not been replaced. This occurs just after a clean installation and before the files from your web or application are uploaded. The system is operational but you must proceed to load your own contents or configure the correct route to the site.
How to solve the “It works!” page
To stop your page from showing the message by default, you simply need to replace the file index.html located in the directory /var/www/html/ for your own website or a web application. It is important to remember to always carry out backup before making any change.
Another option is to modify the virtual host routes in the Apache configuration if your web is hosted on another carpet. Remember that the routes sites-enabled determine which content is visible to the public. Configure access permissions correctly to avoid error or denial messages.
Finally, after making changes, restart the Apache reload so that the changes take effect. You can use the command sudo systemctl reload apache2 the sudo systemctl restart apache2. Check that your website now displays correctly in the browser.
Main advantages
Once you solve this initial problem, you have a robust and highly configurable server to host any website or application. Ubuntu and Apache form a widely documented and used duo, great for development and production environments.
Another positive aspect is the improved security of default routes in Ubuntu. Only files located in authorized locations, such as /var/www, they are accessible right away. This limits potential risks of involuntary exposure.
Aspects to consider
All in all, it's positive, because the initial configuration can be confusing if you've never worked with Apache. Furthermore, manual changes to configuration files must be done with caution so as not to interrupt the service.
If you have modules or specific needs, you may require installing additional dependencies, such as PHP, SSL certificates and extra configurations.
Final verdict
See the “It works!” page. This means that your Apache server on Ubuntu is active, but you need to replace the default content with your own site. With a few basic steps, you can make your server ready and safe to work as you want.
You may also like
How to Create Posts in Adobe Express for Social Networks
With Adobe Express, creating posts for Instagram and other networks has become easier, faster and more professional.
Continue lendo