By Felix
I have a problem when setting SSL to my server’s public address using Apache2 which I followed from this link, then the link asked me to access this link, and I ended up here.
The problem occurs when I’m trying to install Apache 2 by running
sudo apt install apache2
which returns an error
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-06-01 08:25:37 UTC; 18ms ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 26820 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
After encountering that error, I tried googling for the solution and ended up with this first solution (by running the configtest command). Then the test came out that I have not set my ServerName right, so I tried setting it to my public IP address and restarted the apache2 system, but no luck. I still get the error even though the configtest came out only Syntax OK.
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!
Hi there,
Indeed, for some reason, it looks like your Apache service is not starting.
I could suggest following the steps from this tutorial here on how to troubleshoot common Apache problems:
Feel free to share the output of the commands from that tutorial here os I could try to advise you further.
Once your Apache service is up and running, you can install an SSL certificate as normal:
Best,
Bobby
Hi @felixmantaray,
You first need to install and configure Apache2 before you add SSL to your website. To do that check the following tutorial here:
It should help you out with the installation and initial configuration. Once that’s done, you can use Let’s Encrypt(certbot) to automatically install an SSL certificate and have it deployed in apache2.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.