rezapci

Member
Sep 11, 2006
12
0
151
cPanel Access Level
Website Owner
Twitter
Hi

when user or I clicking on mp3 link, it give us 406 error
This error (HTTP 406 Not Acceptable) means that Internet Explorer was able to receive information from the website you visited, but the information was not in a format that Internet Explorer can display.

For more information about HTTP errors, see Help.
the links are fine, I install the flashchat, which is inclued mp3s with files such as longin signout buzz... act, they are not working.. and so on on others link...

what is the solution to solve this problem?
 

rustelekom

Well-Known Member
PartnerNOC
Nov 13, 2003
290
0
166
moscow
check you /usr/local/apache/logs/error_log file and you will see that this is result of mod_security protection. You may disable appropriate rules for mod_security in /etc/httpd/conf/modsec.user.conf file.
 

rezapci

Member
Sep 11, 2006
12
0
151
cPanel Access Level
Website Owner
Twitter
rustelekom said:
check you /usr/local/apache/logs/error_log file and you will see that this is result of mod_security protection. You may disable appropriate rules for mod_security in /etc/httpd/conf/modsec.user.conf file.
I don't have none of those in /

no /usr and no /etc/httpd !
 

rustelekom

Well-Known Member
PartnerNOC
Nov 13, 2003
290
0
166
moscow
oops. sorry, you don't have a root access to server? well, in this case just give to your support your mp3 file url and he will correct that:)
 

rustelekom

Well-Known Member
PartnerNOC
Nov 13, 2003
290
0
166
moscow
if you under freebsd O/S you should first logint to shell as some user like a admin, lct-XXX-XXX (on Layeredtech servers), etc.
 

rezapci

Member
Sep 11, 2006
12
0
151
cPanel Access Level
Website Owner
Twitter
rustelekom said:
oops. sorry, you don't have a root access to server? well, in this case just give to your support your mp3 file url and he will correct that:)
I do have root access but it not appried on my root! I don't know why!

I do have a whm access!
 

rezapci

Member
Sep 11, 2006
12
0
151
cPanel Access Level
Website Owner
Twitter
rustelekom said:
if you under freebsd O/S you should first logint to shell as some user like a admin, lct-XXX-XXX (on Layeredtech servers), etc.

free bsd! I don't know what is it! one of my friends gived me this server from his..

could you explaing more .. please :)
 

rezapci

Member
Sep 11, 2006
12
0
151
cPanel Access Level
Website Owner
Twitter
here is shell

SSH/Shell Access
Shell Login
For security reasons, shell access is not enabled by default. In order to activate shell access on your account, you will need to fax or mail a copy of your driver's license, passport or other photo id to customer service.

Your session wll be logged. Any attempt to copy/delete/view files not belonging to you, will result to your hosting account being terminated!
 

rustelekom

Well-Known Member
PartnerNOC
Nov 13, 2003
290
0
166
moscow
i think your friends can do required action for you :) but for speedup process and because you have root access to WHM, just go to WHM, login and go to Addon Modules section. Here you will see "Manage Addons" or something similar, then just uncheck option Mod_security. Apache will restarted and after this you will not have any problem with mp3 files...
 

rustelekom

Well-Known Member
PartnerNOC
Nov 13, 2003
290
0
166
moscow
if you don't see under Cpanel section (in WHM menu) Addon Modules menu, so, mod_security have been installed on your server manually. In this case, you need edit appropriates files manually from shell. You should find (try locate modsec.conf from command prompt) and then edit it:

<IfModule mod_security.c>
SecFilterEngine On <--- change this to SecFilterEngine Off
SecFilterCheckURLEncoding On
SecFilterForceByteRange 0 255
SecAuditEngine RelevantOnly
SecAuditLog logs/audit_log
SecFilterDebugLog logs/modsec_debug_log
SecFilterDebugLevel 0
SecFilterDefaultAction "deny,log,status:406"
SecFilterSelective REMOTE_ADDR "^127.0.0.1$" nolog,allow
Include "/usr/local/apache/conf/modsec.user.conf"
</IfModule>

BTW. I just forgot about that: you also can try do same in your .htaccess file (place it under your account public_html folder:

<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>
 

rezapci

Member
Sep 11, 2006
12
0
151
cPanel Access Level
Website Owner
Twitter
actually the .hataaccess was in public_html

here what i found


AddType audio/x-ms-wma .wma
AddType audio/x-pn-realaudio ra
AddType audio/x-pn-realaudio .ra
AddType audio/x-pn-realaudio .ram
AddType audio/x-pn-realaudio .rm
AddType audio/x-pn-realaudio .ra
AddType audio/x-ms-wma .wma

RedirectMatch permanent ^/forum$ http://www.alshiatalk.com

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://alshiatalk.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://audio.alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://audio.alshiatalk.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://radio.alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://radio.alshiatalk.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://video.alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://video.alshiatalk.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.alshiatalk.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.audio.alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.audio.alshiatalk.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.forum.alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.forum.alshiatalk.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.radio.alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.radio.alshiatalk.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.video.alshiatalk.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.video.alshiatalk.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
do i have to add some in to this?
 

rustelekom

Well-Known Member
PartnerNOC
Nov 13, 2003
290
0
166
moscow
filename little a strange for me but okay, look as your friend is fan of security :)
yes, you can insert to this file (before all content in this file):

<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>

then just try donwload your mp3 file. if you not receive 406 error message you are win, if that do not help you or you get 500 error message, then you will need do more complex work:

1) locate httpd.conf
2) edit /pathto/httpd.conf
3) find here

LoadModule security_module libexec/mod_security.so

and remark it

#LoadModule security_module libexec/mod_security.so


and next search:

AddModule mod_security.c

and remark it too
#AddModule mod_security.c

save this file and restart apache.

But, please do not edit anything if you do not fill you enough experiencied. Otherwise you may corrupt your apache config file and your all sites will down...