Question

Setup SSL with Apache

I trying to secure my website using a SSL certificate. I’m following this tutorial.

Here’s some information that could be valuable :

  • My website is using GRAV so my virtual host file is the following : /etc/apache2/sites-available/grav.conf
  • I have a domain registered at report-this.io with AWS Route 53.
  • I have the following A’s records :
    • report-this.io
    • www.report-this.io

However, I’m not sure about the following step. In Step 2 * Would ServerName your_domain and ServerAlias www.your_domain become ServerName report-this and ServerAlias www.report-this ? I’ve tried but it doesn’t seem to work. When I run sudo apache2ctl configtest I keep getting the following message : AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OK

Am I doing something wrong ?


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.

It should be,

ServerName report-this.io
ServerAlias www.report-this.io

Note the domain extension at the end. Change it and test again. And to setup a proper hostname for your droplet, you can follow this guide, https://vpsfix.com/3806/change-ubuntu-server-hostname-command-line/

KFSys
Site Moderator
Site Moderator badge
January 9, 2024

Heya @douxdoux,

Yes you are right, ServerName your_domain and ServerAlias www.your_domain become ServerName -report-this.io and ServerAlias www.report-this.io.

As for the, AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OK error, this is a common warning when configuring an Apache2 web server. It’s not a critical error, but rather a notice that Apache couldn’t determine the fully qualified domain name (FQDN) of your server.

To resolve this warning, you need to set the ‘ServerName’ directive in your Apache configuration.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more