Question

How to setup apache2 on my VPS

I have followed https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04 and when I come to the part using: apache2ctl configtest

I get this error: AH00557: apache2: apr_sockaddr_info_get() failed for domain AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

Also when following this tutorial the site is still the apache2 default page. I’m not so good with terminal but I have no clue how to get rid of the apache2 default page, and also the errors I got.

I know I don’t use Ubuntu as VPS, I use Debian.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I will look at the other lamp later, here is my config file:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName turbosmurfen.com
    ServerAlias www.turbosmurfen.com
    DocumentRoot /var/www/turbosmurfen.com
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    ServerName turbosmurfen.com
    ServerAlias www.turbosmurfen.com
    DocumentRoot /var/www/turbosmurfen.com
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Hi there,

For Debian, I could suggest following the steps here:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mariadb-php-lamp-stack-on-debian-10

Regarding the index.html file, you can find it at /var/www/html and you can change it with your own index file.

If you have added an additional Apache virtual host, can you share it here?

Also, if you are not using the root user, make sure to run the config test with sudo:

sudo apache2ctl configtest

Best, Bobby