Options FollowSymLinks and SymLinksIfOwnerMatch are both off
f_fosvov -
Bonjour, étant débutant j'ai fait un simple script python en utilisant cgi que voici:
#! /usr/bin/python3 import cgi print("Content-type: text/html\n") print("<html>Bonjour</html>")
Je l'ai testé en local et cela fonctionnait. (je n'avais pas oublié de le rendre exécutable avec chmod +x index.py)
Afin de le déployer sur internet j'ai du créer et configurer mon fichier .htaccess avec le code suivant pour rendre les scripts cgi exécutable.
RewriteEngine On Options FollowSymLinks Options SymLinksIfOwnerMatch AddHandler cgi-script cgi py Options ExecCGI
J'ai changé l'extension ".py" en ".cgi" de mon fichier index.py.
Mon répertoire: -public_html: (permission 755)
-cgi-bin
-.htaccess (permission 755)
-index.cgi (permission 755)
(J'ai aussi testé les permissions 644)
Cependant lorsque j'accède à mon nom de domaine j'obtiens une erreur 403 type "You don't have permission to access this resource".
Comment pourrait-on régler ce problème?
Merci
2 réponses
Bonjour,
Avant tout, il faudrait vérifier si ça vient de ton htaccess... ou de ton hébergement..
enlève ton fichier htaccess ( temporairement le temps des tests)
Places un fichier index.html ( contenant un simple "coucou" )
essaye d'y accéder ....
Bonjour, en faisant cela je peux en effet y accéder.
Je rajoute qu' en faisant ce simple fichier html et en laissant le fichier .htaccess, j'ai la même erreur 403 avec les mêmes logs "Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions "