Question

Web won't come up in the browser, the server comes up, apache runs

Posted September 29, 2021 110 views
Apache

Hello,

I can telnet into my droplet and see my files and it looks ok, but website not coming up in browser. The droplet is about 3 years old and has been working fine for the most part. I have 3 other droplets created about the same time with the same software. 2 are working and one is not. I opened a ticket and basically their response is,

curl -ILk xxxxxxxxxx.com
HTTP/1.1 403 Forbidden
Date: Fri, 17 Sep 2021 03:49:23 GMT
Content-Type: text/html
Content-Length: 146
Connection: keep-alive
Server: nginx
Vary: Accept-Encoding

Generally, the error that you are seeing will be caused by incorrect permissions to a resource. The 403 response code is caused by incorrect permissions, whether it be authorizations or file permissions.

The first step in troubleshooting this error is to ensure the file exists inside your website’s webroot on the server. The webroot is generally located somewhere within /var/www , however, you can also check where it is inside the configuration file located at /etc/nginx/sites-enabled or /etc/nginx/nginx.conf

Once you have verified that the file/directory exists, you will need to check the permissions. If you have a standard nginx installation then the service will be run as a www-data user so you will need to ensure that the file can be accessed by that user. This is usually done by simply changing the group of resources to www-data

The files are there with the correct permissions. Other commands I have tried,

ps -aux
systemctl status apache2
tail -F /var/log/apache2/error.log
there are errors, but apache is up and running

grep -i kill /var/log/syslog

/usr/sbin/apache2
AH00111: Config variable ${APACHEPIDFILE} is not defined

apache2ctl configtest
Syntax OK

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.

×
Submit an Answer
1 answer

Hello,

I would recommend starting with checking your Nginx error log:

tail -100 /var/log/nginx

Feel free to share the output here.

Also can you share the Nginx server block of your website here as well?

Regards,
Bobby