OVH Community, votre nouvel espace communautaire.

POST requests may be blocked


stef83
03/08/2016, 09h34
Bonjour. La permission du htaccess est 644 comme l'ensemble des fichiers sur le VPS/Cpanel

Le user ? C'est à dire ? LE htaccess a été créé via ftp.

fritz2cat
01/08/2016, 13h05
quel user a créé ce .htaccess et quelles sont les permissions ?
Peut-être que le user www-data ne peut pas le lire ?

Que dit l'error log (sur debian: /var/log/apache2/error.log )

stef83
01/08/2016, 09h28
Slt buddy. Le problème est que même avec le .htaccess vide j'ai le problème. C'est ce que je ne comprends pas. Pour ne plus avoir le problème il me faut le renommer, donc ne plus l'utiliser et seulement là je n'ai plus le problème.

buddy
31/07/2016, 15h16
et si tu repars d'un .htaccess vide et que tu rajoutes les lignes 10 par 10 ..
Tu verras quelles lignes posent problèmes.

stef83
29/07/2016, 07h44
Bonjour ovniz , oui je l'ai fait, j'ai même été jusqu'à mettre le htaccess vide, et j'ai le phénomène. Seul quand je renomme le htaccess le phénomène disparait, mais là évidement je perds l'ensemble de rewrite et autres...

C'est un truc de fou :-)

ovniz
29/07/2016, 07h37
Avez-vous pensé à supprimer tout de votre htaccess, puis à remettre les instructions bloc par bloc ?
Ainsi, vous allez pouvoir cibler le bloc qui coince.
Ensuite, dans le bloc, vous détaillez les instructions pour voir celle qui peut coincer exactement.

C'est un peu long à faire, mais toujours plus rapide qu'attendre une réponse sur le forum.
Comme on n'a pas les POST en question, difficile de dire quelle ligne peut bloquer.

Sachant que le plupart des lignes de ce htaccess ne peuvent pas bloquer une requête POST.

stef83
29/07/2016, 07h19
up !

stef83
20/07/2016, 09h20
Merci Nowwhat pour votre réponse rapide. Comme communiquer le htaccess sur le forum qui semble rigide sur l'intégration de mon htaccess dans le sujet, et je ne vois pas de fonction de fichier joint.

stef83
20/07/2016, 09h05
Merci Nowwhat. Voici mon htaccess.


# ----------------------------------------------------------------------
# Apache configuration file
# This file is best used in /apache2/httpd.conf, but works (slower) in .htaccess
#
# I've spent quite a bit of time compiling what I find to be optimial to me
# and my server. This file is based on:
# - HTML5BoilerPlate: https://github.com/h5bp/html5-boilerplate/
# - W3 Edge: http://www.w3-edge.com/
# - Yahoo! Best Practices: http://developer.yahoo.com/performance/rules.html
# - Caching Tutorial: http://www.mnot.net/cache_docs/
# - Personal experience
#
# v1.2 / 2013.07.01 / Greg Rickaby
# ----------------------------------------------------------------------

# Specify a Default Charset
AddDefaultCharset utf-8

# ----------------------------------------------------------------------
# Cache Control via HTTP Headers + Expires
# Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
# http://httpd.apache.org/docs/2.0/mod/mod_headers.html
# ----------------------------------------------------------------------

# Expires Defaults

ExpiresActive On
# Set default expires to 2 days
ExpiresDefault A172800
ExpiresByType text/css A31536000
ExpiresByType application/x-javascript A31536000
ExpiresByType text/x-component A31536000
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType image/svg+xml A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType text/xml A3600
ExpiresByType video/asf A31536000
ExpiresByType video/avi A31536000
ExpiresByType image/bmp A31536000
ExpiresByType application/java A31536000
ExpiresByType video/divx A31536000
ExpiresByType application/msword A31536000
ExpiresByType application/vnd.ms-fontobject A31536000
ExpiresByType application/x-msdownload A31536000
ExpiresByType image/gif A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType application/vnd.ms-access A31536000
ExpiresByType audio/midi A31536000
ExpiresByType video/quicktime A31536000
ExpiresByType audio/mpeg A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/mpeg A31536000
ExpiresByType application/vnd.ms-project A31536000
ExpiresByType application/x-font-otf A31536000
ExpiresByType application/vnd.oasis.opendocument.database A31536000
ExpiresByType application/vnd.oasis.opendocument.chart A31536000
ExpiresByType application/vnd.oasis.opendocument.formula A31536000
ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
ExpiresByType application/vnd.oasis.opendocument.text A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType application/pdf A31536000
ExpiresByType image/png A31536000
ExpiresByType application/vnd.ms-powerpoint A31536000
ExpiresByType audio/x-realaudio A31536000
ExpiresByType image/svg+xml A31536000
ExpiresByType application/x-shockwave-flash A31536000
ExpiresByType application/x-tar A31536000
ExpiresByType image/tiff A31536000
ExpiresByType application/x-font-ttf A31536000
ExpiresByType audio/wav A31536000
ExpiresByType audio/wma A31536000
ExpiresByType application/vnd.ms-write A31536000
ExpiresByType application/vnd.ms-excel A31536000
ExpiresByType application/zip A31536000


# No caching for dynamic files

ExpiresDefault A0
Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
Header set Pragma "no-cache"


# 1 MIN

ExpiresDefault A60
Header set Cache-Control "max-age=60, must-revalidate"


# 2 DAYS

ExpiresDefault A172800
Header set Cache-Control "max-age=172800, must-revalidate"


# 1 WEEK

ExpiresDefault A604800
Header set Cache-Control "max-age=604800, must-revalidate"


# 1 MONTH

ExpiresDefault A2419200
Header set Cache-Control "max-age=2419200, must-revalidate"


# ----------------------------------------------------------------------
# Mime Types
# Mime Associates the requested filename's extensions with the file's behavior and content
# http://httpd.apache.org/docs/2.0/mod/mod_mime.html
# ----------------------------------------------------------------------


AddType text/css .css
AddType application/x-javascript .js
AddType text/x-component .htc
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType image/svg+xml .svg .svgz
AddType text/plain .txt
AddType text/xsd .xsd
AddType text/xsl .xsl
AddType text/xml .xml
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
AddType image/bmp .bmp
AddType application/java .class
AddType video/divx .divx
AddType application/msword .doc .docx
AddType application/vnd.ms-fontobject .eot
AddType application/x-msdownload .exe
AddType image/gif .gif
AddType application/x-gzip .gz .gzip
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType application/vnd.ms-access .mdb
AddType audio/midi .mid .midi
AddType video/quicktime .mov .qt
AddType audio/mpeg .mp3 .m4a
AddType video/mp4 .mp4 .m4v
AddType video/mpeg .mpeg .mpg .mpe
AddType application/vnd.ms-project .mpp
AddType application/x-font-otf .otf
AddType application/vnd.oasis.opendocument.database .odb
AddType application/vnd.oasis.opendocument.chart .odc
AddType application/vnd.oasis.opendocument.formula .odf
AddType application/vnd.oasis.opendocument.graphics .odg
AddType application/vnd.oasis.opendocument.presentation .odp
AddType application/vnd.oasis.opendocument.spreadsheet .ods
AddType application/vnd.oasis.opendocument.text .odt
AddType audio/ogg .ogg
AddType application/pdf .pdf
AddType image/png .png
AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
AddType audio/x-realaudio .ra .ram
AddType application/x-shockwave-flash .swf
AddType application/x-tar .tar
AddType image/tiff .tif .tiff
AddType application/x-font-ttf .ttf .ttc
AddType audio/wav .wav
AddType audio/wma .wma
AddType application/vnd.ms-write .wri
AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
AddType application/zip .zip


# ----------------------------------------------------------------------
# Gzip compression
# Compress content before it is delivered to the client
# http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
# ----------------------------------------------------------------------


SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary



# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary


# ----------------------------------------------------------------------
# Start rewrite engine
# Provides a rule-based rewriting engine to rewrite requested URLs on the fly
# http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
# ----------------------------------------------------------------------

# FollowSymLinks must be enabled for this to work

Options +FollowSymlinks
RewriteEngine On


# Block access to "hidden" directories whose names begin with a period

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{HTTP_HOST} ^monsite.com$
RewriteRule ^(.*) http://www.monsite.com/$1 [QSA,L,R=301]
RewriteCond %{QUERY_STRING} ^(.*)common/home(.*)$
RewriteRule ^index\.php$ http://www.monsite.com/? [L,R=301]


# ----------------------------------------------------------------------
# Disable server signature (Security)
# Configures the Server HTTP response header
# http://httpd.apache.org/docs/2.2/mod...erversignature
# ----------------------------------------------------------------------

ServerSignature Off
Header unset Etag
FileETag none

# ----------------------------------------------------------------------
# Disable directory browsing (Security)
# Generates directory indexes, automatically, similar to the Unix ls command or the Win32 dir shell command
# http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html
# ----------------------------------------------------------------------


Options -Indexes


# ----------------------------------------------------------------------
# Block access to backup and source files (Security)
# This files may be left by some text/html editors and pose a great security danger
# ----------------------------------------------------------------------


Order allow,deny
Deny from all
Satisfy All


# ----------------------------------------------------------------------
# Increase cookie security (Security)
# This files may be left by some text/html editors and pose a great security danger
# ----------------------------------------------------------------------

php_value session.cookie_httponly true


# ----------------------------------------------------------------------
# HTTP Response Headers
#----------------------------------------------------------------------
Header always append X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection 1;mode=block
Header set X-Content-Type-Options nosniff

# ----------------------------------------------------------------------
# Webfont access
# Allow access from all domains for webfonts.
# ----------------------------------------------------------------------



Header set Access-Control-Allow-Origin "*"



# ----------------------------------------------------------------------
# Force latest IE rendering engine
# ----------------------------------------------------------------------


Header set X-UA-Compatible "IE=Edge,chrome=1"
# mod_headers can't match by content-type, but we don't want to this header on everything

Header unset X-UA-Compatible



# ----------------------------------------------------------------------
# Instructs the proxies to cache two versions of the resource: one compressed, and one uncompressed.
# https://developers.google.com/speed/...geProxyCaching
# ----------------------------------------------------------------------


Header append Vary: Accept-Encoding



# ----------------------------------------------------------------------
# CORS-enabled images (@crossorigin)
# Send CORS headers if browsers request them; enabled by default for images.
# http://developer.mozilla.org/en/CORS_Enabled_Image
# http://blog.chromium.org/2011/07/usi...webgl-and.html
# http://hacks.mozilla.org/2011/11/usi...domain-images/
# http://wiki.mozilla.org/Security/Rev...riginAttribute
# ----------------------------------------------------------------------




SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=IS_CORS



Nowwhat
20/07/2016, 08h47
Citation Envoyé par stef83
....
Auriez-vous une idée ?
Non ....
Citation Envoyé par stef83
....
Puis-je vous soumettre mon htaccess ?
Faut mieux

Attention : il s'agit d'un VPS donc serveur"dédié" donc la seule qui bloque, ou pas, c'est TOI avec le paramétrage présent sur ton serveur.
Entre ton serveur et l'internet entier il y a .... rien**.


** pas entièrement vrai, le système anti ddos d'OVH est présent, mais je ne pense pas que tu ddos ton propre VPS avec des POST )

stef83
20/07/2016, 08h20
Bonjour, j'utilise un VPS avec Cpanel et dessus tourne une solution ecommerce Opencart. Tout fonctionne parfaitement.

J'ai cependant quelques soucis sur certaines fonctions/liens de l'admin qui me génèrent des erreurs/déconnexions de mon admin Opencart.

D'après Opencart cela ne viendrait pas d'eux mais d'une fonction POST qui serait bloquée.

Une chose étrange, quand je désactive mon htaccess, effectivement ces blocage disparaissent. Alors même que j'ai toujours eu ce htaccess sous realese 3 d'OVH à l'époque)

Auriez-vous une idée ? Puis-je vous soumettre mon htaccess ?

Merci