When I run my cgi app using the url "162.###.###.##/cgi-bin/WTG/webapptest.cgi" I get 500 Internal Server Error

Posted October 9, 2018 1.8k views


I have developed a testing CGI web app. After I transferred all the files, including the libraries, under the folder /usr/lib/cgi-bin/WTG/
and try to run it through web browser with the following url:
I get the error
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Apache/2.4.18 (Ubuntu) Server at Port 80

Can anyone please help me out on this issue?
Thank you in advance.

1 comment
  • Hi all,
    I am attaching below the apache2/error.log in case it helps:

    [Tue Oct 09 23:00:10.900063 2018] [cgi:error] [pid 8945] [client] AH01215: /usr/lib/cgi-bin/WTG/WebAppTest: error while loading shared libraries: cannot open shared object file: No such file or directory: /usr/lib/cgi-bin/WTG/webapptest.cgi

    [Tue Oct 09 23:00:10.901339 2018] [cgi:error] [pid 8945] [client] AH01215: Can’t use an undefined value as a symbol reference at /usr/lib/cgi-bin/WTG/webapptest.cgi line 118.: /usr/lib/cgi-bin/WTG/webapptest.cgi

    [Tue Oct 09 23:00:10.901364 2018] [cgi:error] [pid 8945] [client] End of script output before headers: webapptest.cgi

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

Hi all again.


After going through the above apache2/error.log and surfing the first line:
error while loading shared libraries: cannot open shared object file

it means that library “libunwind” was missing from my apache2 setup/configuration.
When I executed the command from Terminal (logged in as root):

sudo apt-get install -y libunwind-dev

it installed several files and then my url works perfectly!!!

I hope my case helps others as well.
Take care.