I followed the tutorial happens when the error Bad Gateway 502
The CGI was not CGI/1.1 compliant.
If you obtain this message probably you have used a "DOS like" editor
like Notepad to edit the helloworld.sh script file. This add a CR/LF
sequence at the end of each lines instead of a single LF. If you are
using UltraEdit or any other good editor probably you can choose to
save the file in Unix format elsewhere use these commands to strip the
CR chars:
# cat helloworld.sh | tr -d '\r' > helloworld1.sh
# cp helloworld1.sh helloworld.sh
I compiled this code in webcompiler
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("Content-type: text/html\n\n");
printf("Hello World !");
}
Someone knows how to answer that?