LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-21-2006, 01:15 PM   #1
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
apache2.x : force timeout instead of 404


hey there,

simple thought - probably harder to implement - i guess...

i run a webserver which is setup with virtual hosts - using virtualDocumentRoot
say for example i have foo.example.com and fibble.example.com pointing to the address of my webserver,
apache will try
1. is there a virtualHost for this requested domain name
2. if not - can i find a matching directory in the virtualDocumentRoot

if step 2 should fail apache will of course respond with a 404 as in file not found

is there any way i could filter out 404's and force apache to ignore the request?
of even 'mark' the packets so i can get hold of them in iptables?
or force a client timeout some other way?

i am quite happy for this to be an iptables solution too...
 
Old 09-25-2006, 06:45 AM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Original Poster
Rep: Reputation: 33
i have found a solution (for all of thouse who are curious or whant to do similar):

as of kernel 2.6.14 i think it is (check on the netfilter website) the option -m string is available which will mach a string - in my case i need following command:

/sbin/iptables -A OUTPUT -m string --algo kmp --string "403 Forbidden" -j DROP

refer to the iptables man page for more info

edit: it is still a little unclean and i shall see if i can find something slightly better...
 
  


Reply



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
VPNC seems to timeout quickly- how do I lengthen the timeout? spiffytech Linux - Software 30 10-05-2018 04:04 AM
SuSe Apache2 error: cannot adjust 'apache2' service sir_shunt SUSE / openSUSE 14 04-18-2006 11:36 AM
404 page taken over? Keyser Sose Linux - Software 9 01-09-2005 12:26 PM
Server timeout, force to use main server? AdrianM Linux - Software 0 08-20-2004 08:08 PM
how to uninstall apache2 which is installed by emerge apache2 flybirdlong Linux - Software 1 07-17-2004 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:02 AM.

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
Open Source Consulting | Domain Registration