Chcę uruchomić plik Pythona w przeglądarce. Mam zainstalowany apache. i skonfigurowany plik httd.conf
. Utworzono plik test.py
. Następnie próbowałem uruchomić test.py
w przeglądarce, wpisując htt://localhost/test.py
. Kiedy to zrobić, pojawia się następujący błąd:Uruchamianie pliku .py w przeglądarce
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] 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.
W moim dzienniku błędów
[Thu Jul 07 18:39:55 2011] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: test.py
[Thu Jul 07 18:39:55 2011] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/test.py
Co może być problem?
Uruchomione Pythona w przeglądarce oznacza, że trzeba skonfigurować przeglądarkę, a nie serwera. Po uruchomieniu Pythona w przeglądarce, twoja przeglądarka (FireFox, IE, Opera, Safari itp.) Uruchamia Python. To nie ma nic wspólnego z Apache. Co tak naprawdę naprawdę robisz? –
@ S.Lott A jak skonfigurować przeglądarkę? –