Reputation
392
Top tag
Next privilege 500 Rep.
Access review queues
Badges
2 5 21
Impact
~59k people reached

May
7
comment How do I add no-cache headers to all 404 pages served by apache and nginx?
I'm marking your answer as accepted. If someone wants to provide a more generic apache answer later, or an nginx one that works globally rather than per server, they can get upvoted.
May
7
comment How do I add no-cache headers to all 404 pages served by apache and nginx?
For apache, I decided that I actually wanted to use a custom page, so I did this: ErrorDocument 404 /path/to/my/404.php. And then inside the 404.php, I did <?php // do not cache 404 header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?>
May
7
comment How do I add no-cache headers to all 404 pages served by apache and nginx?
Clever. I am probably going to go with the other solution, since it already works and doesn't require a default Cache-Control header to be specified every time, but this was some thinking outside the box.
May
7
comment How do I add no-cache headers to all 404 pages served by apache and nginx?
Looks like omitting root works as well. If that's removed, it is pretty much what I ended up doing for nginx.
May
7
comment How do I add no-cache headers to all 404 pages served by apache and nginx?
There are two issues here, but that's the direction I went with. 1. I didn't want to override the default 404 page and have to create rules in every listen since location is not supported inside http directly. 2. More importantly, your snippet actually doesn't work because add_header only applies to 20X and 30X (nginx.org/en/docs/http/ngx_http_headers_module.html). However, we're in luck, since as of the recently released 1.7.5, you can now add an always modifer which will apply it to all response codes. I had to upgrade nginx but it was a good kick in the butt. It works.
May
7
comment How do I add no-cache headers to all 404 pages served by apache and nginx?
So far, I am pretty sure that you can't override headers returned by default 404 handlers in both apache and nginx (please prove me wrong!). I was able to override the 404 handler and point it to a PHP file that sends such headers in apache, but since nginx doesn't have PHP support on my setup, and setting "expires -1;" on the 404 location didn't seem to actually do anything, I'm still at a loss as to how to do this in nginx.
May
7
comment How do I add no-cache headers to all 404 pages served by apache and nginx?
Similar question, though only for apache (still unanswered too): serverfault.com/questions/331544/….
Jun
2
comment illegitimate traffic from user agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
@JohnGardeniers I would wager a bounty would be awarded to anyone who can identify the foe.
Oct
10
comment Wordpress Installation on Two Servers - Loadbalancing
I would advise against using a plugin that hasn't been updated since 2009 - it's unmaintained and you may regret it in the future (S3 changes, security, etc).
Oct
10
comment Wordpress Installation on Two Servers - Loadbalancing
GlusterFS is a fascinating suggestion - thank you for that. I'm exploring that as a solution to my Wordpress scaling of static stuff.
Oct
6
comment Securing WordPress Blog Installation
Btw, a much better option for this is described here: codex.wordpress.org/Administration_Over_SSL. Just enable define('FORCE_SSL_ADMIN', true); in the config.
Oct
5
comment Securing WordPress Blog Installation
An equally good idea would be to just secure the same dir with an htpassword.
Oct
5
comment Securing WordPress Blog Installation
Same here - never even realized my wp-admin is not https.
Aug
3
comment How to monitor and log the memory/cpu usage of processes over time?
Warren, that's an entirely different question.
Jul
30
comment How to monitor and log the memory/cpu usage of processes over time?
Ah, I forgot to mention the little part where I'd prefer it to be free, and open source, if possible. Over $100 per server is not really what I'm looking to spend (and I only have 1 server, not 5). serverdensity.com/pricing
Jul
30
comment How to monitor and log the memory/cpu usage of processes over time?
I already clarified it in the post but to clarify again: I want to know the state of the system when it goes down due to swap death. I want to know who the worst offenders are. And btw, it doesn't have to be a memory leak - just an influx of traffic, or whatever causes high memory usage. So, again, no advance knowledge of binary names should be configured.
Jul
27
comment How to monitor and log the memory/cpu usage of processes over time?
Clarification: Process names are not and should not be known in advance - the idea is to just let it monitor and then have a look at the top offenders.
Jul
27
comment How to monitor and log the memory/cpu usage of processes over time?
I'd like a ready solution for reporting the things I mentioned, most importantly processes consuming the most memory. I'm also not sure what VZ is.
Jul
27
comment How to monitor and log the memory/cpu usage of processes over time?
atop doesn't seem to have a report that would provide me with what I wanted. Please correct me if I'm wrong.
Jul
26
comment How to monitor and log the memory/cpu usage of processes over time?
Does it do it with a plugin. If so, which one? I haven't been able to find one that doesn't require a pre-configured list of processes to monitor.