LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 08-11-2009, 07:54 AM   #1
vishnukumar
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Rep: Reputation: 0
Bad Request Your browser sent a request that this server could not understand.


Hi,

I got bad request (HTTP 400). I can't solve this problem. Only this request gets bad. In the server, the request should be processed and the process contains execution of unix command like javac, java. I have the same project in port 8081, but the request didn’t get as bad request. Only for the port 80 gets wrong.

Below is the response I got for the request.

Quote:
Bad Request

Your browser sent a request that this server could not understand.
Apache/2.2.0 (Fedora) Server at www.xxxxxx.xxx Port 80
Below, I have displayed some useful file content for solution

etc/hosts


Quote:
127.0.0.1 ip-xx-xx-xxx-xxx.ip.secureserver.net ip-xx-xx-xxx-xxx localhost.secureserver.net localhost.localdomain localhost
mod_security


Quote:
# Example configuration file for the mod_security Apache module

LoadModule security2_module modules/mod_security2.so
LoadModule unique_id_module modules/mod_unique_id.so

<IfModule mod_security2.c>
# This is the ModSecurity Core Rules Set.

# Basic configuration goes in here
Include modsecurity.d/modsecurity_crs_10_config.conf

# Protocol violation and anomalies.

Include modsecurity.d/modsecurity_crs_20_protocol_violations.conf
Include modsecurity.d/modsecurity_crs_21_protocol_anomalies.conf

# HTTP policy rules

Include modsecurity.d/modsecurity_crs_30_http_policy.conf

# Here comes the Bad Stuff...

Include modsecurity.d/modsecurity_crs_35_bad_robots.conf
Include modsecurity.d/modsecurity_crs_40_generic_attacks.conf
Include modsecurity.d/modsecurity_crs_45_trojans.conf
Include modsecurity.d/modsecurity_crs_50_outbound.conf

# Search engines and other crawlers. Only useful if you want to track
# Google / Yahoo et. al.

# Include modsecurity.d/modsecurity_crs_55_marketing.conf

# Put your local rules in here.

Include modsecurity.d/modsecurity_localrules.conf
</IfModule>
Please, help me to solve this problem.

Thanks
 
Old 08-12-2009, 07:59 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
it'd help if you showed us what the request actually was...
 
Old 08-13-2009, 01:56 AM   #3
vishnukumar
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Original Poster
Rep: Reputation: 0
Hi acid_kewpie,

The request to the server has a content of textarea. Sorry, I am not good at english. But, I have fixed the issue. When I look on error_log, I found

[Wed Aug 12 05:24:07 2009] [error] [client xx.xx.xx.xx] ModSecurity: Access denied with code 400 (phase 2). Pattern match "%0[ad]" at REQUEST_URI. [file "/etc/httpd/modsecurity.d/modsecurity_crs_40_generic_attacks.conf"] [line "211"] [id "950910"] [msg "HTTP Response Splitting Attack"] [data "%0d"] [severity "ALERT"] [hostname "www.xxxxx.xxx"] [uri "/compileandexecute"] [unique_id "5USyWmFKdhQAACEzt7MAAAAS"]

Then, from the above error statement, the line 211 with id 950910 in modsecurity_crs_40_generic_attacks.conf and commented the line. After restarting httpd, I didn't get "bad request (http 400)". But, I don't know, this is the correct solution to fix the issue.

Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache - Bad Request - IMPORTANT PLEASE c00kie Linux - Server 4 10-15-2012 10:13 AM
webserver doesn't reply to external request but it reply's to local request ziba Linux - Server 4 05-11-2009 06:27 PM
network programming -- bad request mehesque Programming 2 09-21-2004 02:28 PM
request sent by a web-browser gajaykrishnan Linux - Networking 1 08-01-2004 01:33 PM
Dispatch_input: bad request line Advocate Linux - Security 3 05-04-2001 03:31 AM


All times are GMT -5. The time now is 11:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration