Partage
  • Partager sur Facebook
  • Partager sur Twitter

utilisation de Python chez o2switch

Erreur : Internal Server Error

    25 février 2013 à 21:26:09

    Bonjour,

    J'ai installé un petit script en Python sur mon hébergeur à des fins de test.

    Je l'ai placé dans le répertoire /cgi-bin ainsi qu'un .htacess.

    Malgré tout j'ai un retour en erreur :

    "Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@visionnature-jld.fr 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 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    "

    Quelqu'un utilise-t-il Python chez o2switch ? Faut-il faire quelques paramétrage particulier? Merci de votre aide.

    Le script Python :

    #!/usr/bin/python3

    # -*- coding: UTF-8 -*-

    html_header = 'Content-type: text/html\r\n\r\n'

    html_code= '''

    <!DOCTYPE html>

    <html>

         <head>

              <title>Mon super site en Python</title>

         </head>

         <body>

              <p>hello</p>

         </body>

    </html>

    '''

    print(html_header)

    print(html_code)

    le .htaccess :

    AddHandler cgi-script .py

    Encore une info, le script fonctionne parfaitement en local sous wampServeur (Apache).


    • Partager sur Facebook
    • Partager sur Twitter
      26 février 2013 à 12:02:15

      Il ne faut pas utiliser le .htaccess mais ajouter un gestionnaire cgi-script qui prend en compte les .py depuis le panel dans la rubrique "gestionnaire apache". Le chemin vers python est /usr/bin/python
      • Partager sur Facebook
      • Partager sur Twitter
        26 février 2013 à 13:22:25

        merci je vais tenter ce soir

        • Partager sur Facebook
        • Partager sur Twitter

        utilisation de Python chez o2switch

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown