Report this

What is the reason for this report?

Trying to set up a reverse proxy, apache errors and does not start

Posted on September 18, 2019

I’m trying to set up a reverse proxy on my droplet, following this tutorial step by step -

https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-18-04-server

i’m on the “change listening ports step” and whenever i try to reload apache - i get error message that it is not even active. When i try to start apache with - sudo systemctl start apache2.service i’m told that "job for apache2.service failed because the control process exited with error code. When i do systemctl status apache2.service jounralctl -xe to find out what’s wrong i get “syntax error on line 150” - which i have not touched i guess at all? I guess it’s a relatively easy fix but i have not found any comment about it…



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!

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.

Hello,

You can open the apache configuration file on line 150 and see what’s there. You can also run the following command:

httpd -t

It will check the apache configuration file and see if there are syntax errors. You can also paste the 150 line of the config so we can check this for you.

Looking forward to your reply.

Alex

Did you run the source command like this:

source /etc/apache2/envvars

or:

sudo apache2 source /etc/apache2/envvars

I’ve had a similar issue and using the "source /etc/apache2/envvars " command sorted the issue for me.

Looking forward to your reply.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.