I have a remote ubuntu 14.04 OS and recently opened a new port 8083 by adding two lines on the /etc/apache2/ports.conf as below

Listen 8083

My public IP for my remote server is and whenever I visit I get an 500 internal server error, which I found out by looking at the access logs. But my netstat -peanut shows the ports is opened nicely for business.

tcp6  0  0 :::80      :::* LISTEN      0      1090145     -               
tcp6  0  0 :::8083    :::* LISTEN      0      1090153     -               

So I dont know what went wrong in this as I cannot access any more information on my logs. Thanks. Below is the report of tail -f /var/log/apache2/error.log

[Sun Nov 20 16:36:42.788309 2016] [core:notice] [pid 29962] AH00094: Command line: '/usr/sbin/apache2'
[Sun Nov 20 16:38:18.854098 2016] [mpm_prefork:notice] [pid 29962] AH00169: caught SIGTERM, shutting down 
[Sun Nov 20 16:38:19.919968 2016] [mpm_prefork:notice] [pid 30043] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.20 OpenSSL/1.0.1f configured -- resuming normal operations
[Sun Nov 20 16:38:19.919990 2016] [core:notice] [pid 30043] AH00094: Command line: '/usr/sbin/apache2'
[Mon Nov 21 01:36:10.133501 2016] [:error] [pid 30049] [client] script '/var/www/html/testproxy.php' not found or unable to stat
  • "500 internal server error" means something wrong with apache2 configuration. – Ipor Sircer Nov 20 '16 at 17:44
  • Can you post the error from error log Do #tail -f /var/log/apache2/error.log and hit the URL from browser, Post here what you are seeing in log – Vishal Nov 20 '16 at 18:33
  • Can you send a grep 500 /var/log/apache2/ | tail ? Seems like some php script is failing – Fredi Nov 21 '16 at 15:03
  • @Vishal I have added a link to the screenshot of my tail of /var/log/apache2/error.log – Sanjok Gurung Nov 21 '16 at 18:56

script '/var/www/html/testproxy.php' not found or unable to stat

This error message indicates that the file testproxy.php can not be read by apache2 which in fact means on ubuntu OS that the user www-data has not the proper permission.

The following is one way to solve this and might differ if you have configured apache2 to run as a different user than www-data.

sudo chown www-data:www-data /var/www/html/testproxy.php
sudo chmod 640 /var/www/html/testproxy.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.