Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
media Posted September 19, 2016 Posted September 19, 2016 ForbiddenYou don't have permission to access /test/ on this server.Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request Anyone? (Latest IP board)
EmpireKicking Posted September 19, 2016 Posted September 19, 2016 install the files again! you are using the test website I see right?
media Posted September 20, 2016 Author Posted September 20, 2016 Yes, I do but after latest update admin or front end both giving me same error message... I will try again...
media Posted September 20, 2016 Author Posted September 20, 2016 I have just uploaded same thing again and no difference getting same error message Forbidden You don't have permission to access /test/admin/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. Forbidden You don't have permission to access /test/admin/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Daniel F Posted September 20, 2016 Posted September 20, 2016 Do you have a custom .htaccess file in your test directory and are the file permissions correct?
media Posted September 20, 2016 Author Posted September 20, 2016 Hi Daniel, Thank you for your help. Permission is 644 and content is this (has htaccess user) #<ipb-protection> <Files ~ "^.*\.(php|cgi|pl|php3|php4|php5|php6|phtml|shtml|([a-z0-9]{32}))$"> Order allow,deny Deny from all </Files> #</ipb-protection> <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase /forum/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !\..+$ RewriteRule . /test/index.php [L] </IfModule> AuthName "test board" AuthUserFile "/home/media/.htpasswds/public_html/test/passwd" AuthType Basic require valid-user
media Posted September 20, 2016 Author Posted September 20, 2016 Ok I know what cause this problem: When I remove this part #<ipb-protection> <Files ~ "^.*\.(php|cgi|pl|php3|php4|php5|php6|phtml|shtml|([a-z0-9]{32}))$"> Order allow,deny Deny from all </Files> #</ipb-protection> from my .htaccess file everything works just fine... If I keep above code in my .htaccess file, my server is throwing below lines on my serverside error log [Tue Sep 20 19:43:04.318606 2016] [access_compat:error] [pid 13006] AH01797: client denied by server configuration: /home/media/public_html/test/index.php5 [Tue Sep 20 19:43:04.315161 2016] [access_compat:error] [pid 13006] AH01797: client denied by server configuration: /home/media/public_html/test/index.phtml [Tue Sep 20 19:43:04.315111 2016] [access_compat:error] [pid 13006] AH01797: client denied by server configuration: /home/media/public_html/test/index.php [Tue Sep 20 19:43:04.315077 2016] [access_compat:error] [pid 13006] AH01797: client denied by server configuration: /home/media/public_html/test/index.php3 [Tue Sep 20 19:43:04.315024 2016] [access_compat:error] [pid 13006] AH01797: client denied by server configuration: /home/media/public_html/test/index.php4 [Tue Sep 20 19:43:04.313739 2016] [access_compat:error] [pid 13006] AH01797: client denied by server configuration: /home/media/public_html/test/index.cgi [Tue Sep 20 19:43:04.313576 2016] [access_compat:error] [pid 13006] AH01797: client denied by server configuration: /home/media/public_html/test/index.pl [Tue Sep 20 19:43:04.312149 2016] [access_compat:error] [pid 13006] AH01797: client denied by server configuration: /home/media/public_html/test/index.shtml
ASTRAPI Posted September 21, 2016 Posted September 21, 2016 You are mixing the new auth config and the old one. OLD RULE: Order allow,deny Deny from all NEW RULE: Require all denied So replace the two lines above with the new rule and try it I have many years to use Apache and maybe my recommendation will not perfect for you.... But it is easy to check and nothing will break
media Posted September 21, 2016 Author Posted September 21, 2016 On 9/20/2016 at 2:05 AM, Daniel F said: Do you have a custom .htaccess file in your test directory and are the file permissions correct? @Daniel F any thoughts or should I go with @ASTRAPI solution (haven't tried it yet)?
ASTRAPI Posted September 21, 2016 Posted September 21, 2016 Just check my solution and if doesn't work revert it It is a simple edit that easily can revert ....
media Posted September 21, 2016 Author Posted September 21, 2016 14 minutes ago, ASTRAPI said: Just check my solution and if doesn't work revert it It is a simple edit that easily can revert .... Only replaced that line with other 2 lines I got same problem Forbidden You don't have permission to access /test/admin/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
ASTRAPI Posted September 21, 2016 Posted September 21, 2016 My fix was for : [access_compat:error] [pid 13006] AH01797: client denied by server configuration: so it seems that it works For the Forbidden error it looks like an .htaccess issue....
ASTRAPI Posted September 21, 2016 Posted September 21, 2016 Ok found it I just re read your posts You are using this htaccess on your /test folder: #<ipb-protection> <Files ~ "^.*\.(php|cgi|pl|php3|php4|php5|php6|phtml|shtml|([a-z0-9]{32}))$"> Order allow,deny Deny from all </Files> #</ipb-protection> <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase /forum/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !\..+$ RewriteRule . /test/index.php [L] </IfModule> AuthName "test board" AuthUserFile "/home/media/.htpasswds/public_html/test/passwd" AuthType Basic require valid-user then is normal to not work as with this code: #<ipb-protection> <Files ~ "^.*\.(php|cgi|pl|php3|php4|php5|php6|phtml|shtml|([a-z0-9]{32}))$"> Order allow,deny Deny from all </Files> #</ipb-protection> you are blocking php ! This code should be on the .htaccess that is on the uploads folder only ! As the users uploads goes there and you don't want them to run any php, cgi e.t.c files So you can add that code on .htaccess files only on folders that users upload data and you don't want to let them run any code from there.
media Posted September 21, 2016 Author Posted September 21, 2016 23 minutes ago, ASTRAPI said: Ok found it Ah, thank you so much...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.