chlorella2006 Posted December 18, 2017 Posted December 18, 2017 Hi, I created a file main.py in /public_html/cgi-bin #!/usr/bin/pythonprint "Content-Type: text/html\n\n"print "Hello World" I tried to run it with http://sw.heliohost.org/cgi-bin/main.py But I got following error, anyone can help me? Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, webmaster@sw.heliohost.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Krydos Posted December 18, 2017 Posted December 18, 2017 The error is because you're using dos line endings, and this is a linux server. The easiest way to fix this is to create the file through cpanel filemanager using the code editor and copy/paste your code in. This will ensure that your file has the correct line endings. Another option is to use a windows editor that understands proper line endings such as notepad++.
Luigi123 Posted December 18, 2017 Posted December 18, 2017 Let us know if you need any help or have any questions.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now