Trying to run python on a web server. OS: Debian 9.5

In the folder with the script created. Htaccess

AddHandler cgi-script .py Options +ExecCGI 

Created a test.py file

 #!/usr/bin/python print('Hello, world!') 

I launch http://my-site.ru/test.py - 503 error. What did I miss?

  • Script rights set? Does he have permission to perform? - Sergey Gornostaev
  • Yes, rechecked, rights 755. - Gennady
  • @Gennady what happens if you run from the command line. \ Test.py? - Ivan Ignatiev - MSFT
  • At the command line, run python test.py Shows Hello, world! - Gennady
  • ru.wikipedia.org/wiki/CGI#%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80 , well, when repeating a failure, see the Apache program logs. - aleksandr barakin

0