CGI : 502 Bad Gateway The CGI was not CGI/1.1 compliant.
-
05-07-2019 - |
Question
I have a form in an HTM page that, after pressing the submit button, calls the index.cgi !
#!/usr/bin/sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/nastools/pysqlite2/pysqlite2
export PYTHONPATH=$PYTHONPATH:/nastools/pysqlite2/:/path/impo
export PATH=/nastools/python64/bin/:$PATH
python /remote/path/impo/manager.py 2>&1
I just want to run the manager.py that is stored in folder /remote/path/impo !!
I am totally going crazy with this stupid error and cannot find the way to solve it ...
Any suggestion ??
Solution
Thanks NineBarry but I found the problem ... After trying with CGI scripts surely good like :
#!/bin/sh
echo Content-type: text/html
echo
echo
echo "<HTML>"
echo "<HEAD>"
echo "</HEAD>"
echo "<BODY>"
echo "<H2>Users logged in are:</H2>"
echo "<PRE>"
who
echo "</PRE>"
echo "</BODY>"
echo "</HTML>"
I've remembered by chance that I haven't set the access rights !!!! I LOST 2 HOURS on it ... I've fixed it with just chmod 777 name.cgi ...
Sorry to all of u if I ve wasted your time !
Bye
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow