Erreur http 403 avec wampsever
rimamim
Messages postés
3
Date d'inscription
Statut
Membre
Dernière intervention
-
elgazar Messages postés 5776 Date d'inscription Statut Membre Dernière intervention -
elgazar Messages postés 5776 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
J’utilise wampserver et j ai téléchargé un projet web open source Mediboard J'ai un problème d’accès à des fichiers de mon projet, il m'affiche une erreur 403 et il me demande de autoriser les fichiers .htaccess de Mediboard à redéfinir certaines règles, en spécifiant AllowOverride All dans les fichiers de configuration Apache pour le répértoire web. J'ai cherché mais j ai pas trouver une solution.
Pouvez vous m 'aider svp?
Merci
J’utilise wampserver et j ai téléchargé un projet web open source Mediboard J'ai un problème d’accès à des fichiers de mon projet, il m'affiche une erreur 403 et il me demande de autoriser les fichiers .htaccess de Mediboard à redéfinir certaines règles, en spécifiant AllowOverride All dans les fichiers de configuration Apache pour le répértoire web. J'ai cherché mais j ai pas trouver une solution.
Pouvez vous m 'aider svp?
Merci
2 réponses
-
Bonjour,
Sans un minimum d'infos... il nous sera difficile de te répondre :
Quelle version de wamp utilises tu ?
Quelle version de php est utilisée ?
Quelle version de PHP est préconisée pour le projet Mediboard ?
As tu créé un alias ou un vhosts pour accéder à ton projet sous wamp ?
Que contient le fichier .htaccess du projet Mediboard ?
-
pour la version de wamp j'utilise la version 3.1.0 pour 64bits et la version 5.6.31 de php.
pour mediboard ils ont pas specifier une version.
pour l'alias j ai pas creé et je ne sais pas comment le faire.
le fichier .htaccess du Mediboard il contient ceci:
Options -Indexes
<IfModule mod_env.c>
SetEnv AllowOverrideDefined "true"
</IfModule>
<IfModule mod_deflate.c>
# DEFLATE by type - html, text, css, xml, svg
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml image/svg+xml
# DEFLATE by type - javascript
AddOutputFilterByType DEFLATE application/x-javascript application/javascript text/javascript text/x-js text/x-javascript
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml svg
</IfModule>
<IfModule mod_headers.c>
# Apache request duration and start time, in microseconds : D=187183 t=1392367646740874
Header set X-Mb-RequestInfo '%D %t'
<IfModule mod_setenvif.c>
<FilesMatch "\.php$">
SetEnvIf X-Requested-With "XMLHttpRequest" IS_AJAX
Header add Set-Cookie "timing=%D %t" env=!IS_AJAX
</FilesMatch>
</IfModule>
# P3P header fixing logout issues in IE
Header set P3P 'CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'
# 1 day cache for CSS and JS
<FilesMatch "\.(js|css)$">
Header set Cache-Control "max-age=86400, public"
</FilesMatch>
# 1 week cache for not versionned resources
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf|pdf|jar|svg)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
# 1 month cache for versionned resources
<FilesMatch "\.(js|css|flv|gif|jpg|jpeg|png|ico|swf|pdf|jar)(\?[^&]+)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
</IfModule>
<FilesMatch "\.(tpl|tpl\.php|class\.php|sh|cer|p7b|crl)$">
order allow,deny
# deny from all
Require all granted
</FilesMatch>
<FilesMatch "mb-log\.html">
order allow,deny
# deny from all
Require all granted
</FilesMatch>
<FilesMatch "pid\.(\d+)$">
order allow,deny
#deny from all
Require all granted
</FilesMatch>
<IfModule mod_alias.c>
# modules/*/*.php
RedirectMatch 403 modules/[^/]+/[^/]+\.php$
# modules/*/controllers/*.php
RedirectMatch 403 modules/[^/]+/controllers/[^/]+\.php$
# vendor/*.php
RedirectMatch 403 vendor/[^/]+(/[^/]+)?\.php$
# (cli|shell)/*
RedirectMatch 403 (cli|shell|bin|libpkg)/*$
# (includes|locales|shell|templates).*
RedirectMatch 403 (includes|locales)/[^/]+(/[^/]+)?\.(php|ttf)$
# tmp/templates_c
RedirectMatch 403 /tmp/(templates_c|phpthumb|shared)/
</IfModule>
php_flag magic_quotes_gpc off
php_flag session.auto_start off
# php_flag session.cookie_httponly on # Still needed because of yoplet
CORDIALEMENT,
Rima -
Je suis d'accord avec toi
<IfModule mod_env.c> SetEnv AllowOverrideDefined "true" </IfModule> <IfModule mod_deflate.c> # DEFLATE by type - html, text, css, xml, svg AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml image/svg+xml # DEFLATE by type - javascript AddOutputFilterByType DEFLATE application/x-javascript application/javascript text/javascript text/x-js text/x-javascript # DEFLATE by extension AddOutputFilter DEFLATE js css htm html xml svg </IfModule> <IfModule mod_headers.c> # Apache request duration and start time, in microseconds : D=187183 t=1392367646740874 Header set X-Mb-RequestInfo '%D %t' <IfModule mod_setenvif.c> <FilesMatch "\.php$"> SetEnvIf X-Requested-With "XMLHttpRequest" IS_AJAX Header add Set-Cookie "timing=%D %t" env=!IS_AJAX </FilesMatch> </IfModule> # P3P header fixing logout issues in IE Header set P3P 'CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"' # 1 day cache for CSS and JS <FilesMatch "\.(js|css)$"> Header set Cache-Control "max-age=86400, public" </FilesMatch> # 1 week cache for not versionned resources <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf|pdf|jar|svg)$"> Header set Cache-Control "max-age=604800, public" </FilesMatch> # 1 month cache for versionned resources <FilesMatch "\.(js|css|flv|gif|jpg|jpeg|png|ico|swf|pdf|jar)(\?[^&]+)$"> Header set Cache-Control "max-age=2592000" </FilesMatch> </IfModule> <FilesMatch "\.(tpl|tpl\.php|class\.php|sh|cer|p7b|crl)$"> order allow,deny # deny from all Require all granted </FilesMatch> <FilesMatch "mb-log\.html"> order allow,deny # deny from all Require all granted </FilesMatch> <FilesMatch "pid\.(\d+)$"> order allow,deny #deny from all Require all granted </FilesMatch> <IfModule mod_alias.c> # modules/*/*.php RedirectMatch 403 modules/[^/]+/[^/]+\.php$ # modules/*/controllers/*.php RedirectMatch 403 modules/[^/]+/controllers/[^/]+\.php$ # vendor/*.php RedirectMatch 403 vendor/[^/]+(/[^/]+)?\.php$ # (cli|shell)/* RedirectMatch 403 (cli|shell|bin|libpkg)/*$ # (includes|locales|shell|templates).* RedirectMatch 403 (includes|locales)/[^/]+(/[^/]+)?\.(php|ttf)$ # tmp/templates_c RedirectMatch 403 /tmp/(templates_c|phpthumb|shared)/ </IfModule> php_flag magic_quotes_gpc off php_flag session.auto_start off # php_flag session.cookie_httponly on # Still needed because of yoplet
-
-
-
Bonjour
est ce que tu as essayé ceci ?
une fois wampserver démarré, clique sur l'icone de wamp => apache => httpd.comf.
dans le fichier qui s'ouvre, lance une recherche sur le terme rewrite (en faisant ctr+F) pour trouver cette ligne#LoadModule rewrite_module modules/mod_rewrite.so
S'il il a un # devant la ligne, efface-le et enregistre le fichier sinon ne touche à rien
ensuite va sur l'icone wampserver =>apache=>modules et cherche rewrite_module et coche la ligne en cliquant dessus (le service va s'arreter et l'icone wamp va passer a l'orange puis repasser au vert)
vérifie encore une fois que rewrite-module est bien coché et clique sur redémarrer les services