sites down but server up, what to do? - apache

I could ping my websites but I got a 404 going there.
My server was running normally, no new mail for root.
Is there a service to alert you when your websites are down ?
What do you usually do to understand why it's down?
I took a look at the apache2/error.log and saw that it couldn't access one of the website I had deleted a few hours ago. I just did a a2dissite and restarted and it was fixed, I could access my websites.
I either got lucky or I postponed a problem. Any idea what I should do next to make sure everything is alright? (I'm on debian by the way)

Related

IIS Remote Manager is missing icons for a specific site

I have a developer that came to me with and issue. He is remotely managing one of his sites on one of our development servers and all of a sudden he lost all of the icons in IIS for this specific site..
All other sites display his icons correctly and when I have him test on another computer everything displays correctly.. So what could have gone wrong on his machine? It was working but is now not working.. Any help here would be greatly appreciated.. Never seen this before and cant seem to figure out what caused it to just go away.. There should be so many more options for him.. Plus if you can see he lost the ability to see the folders on this site also.. And it is every site on this server.. But like I said it is just on his computer, he goes to a different computer he has access to everything..
Guess I cant post a picture.. But if you need to see it I can send it to you if you need to see what I am talking about..
Come to find out he was ignoring the prompt that he was getting saying that there were new versions of the tools to download on his machine that are on the server.. He just hit Cancel instead of selecting them and hitting ok to install the DLL's and enabling them.

Apache Crash Dialog

I'm running XAMPP on my windows machine and experiencing a problem with Apache crashing a couple times a day. When it does, a dialog pops up and I have to manually tell windows to end the program. After I do that, XAMPP automatically starts it back up in a couple of seconds with no issues. When it crashes while I'm not home though, the server is down until I get back. So I have two questions:
Are periodic crashes something that should be expected, or is this indicative of another issue I should be trying to pinpoint?
If this is something I should just learn to deal with, is there a way to automatically restart httpd.exe when these issues occur, so I don't experience down time when I'm away from home?
You'd look into log files, especially the Apache access and error logs, to see what happened, when you are not at home. I've met some similar situation: I have a problematic PHP script hosted on my server, when someone visits the page, it leads to an Apache crash.
I'd suggest you do the investigation as follows:
Search the timestamp of recent Apache restart.
Check the Apache access log to see whether there are some scripts have been accessed.
Manually access these scripts in your browser (to see if Apache will crash again)
You'd better check the PHP error log as well.
If there is really nothing suspicious, you can try WAMP bundle alternatively, which is also a very popular PHP development environment and it is stable.
Although there aren't many cases in which one should "expect" periodic crashes, in this case you are better of reconsidering your setup. From the frontpage of the XAMPP site:
XAMPP is the most popular PHP development environment
Sure, you can use it as "production" server, but XAMPP isn't build for hosting websites, it is intended as development server, so you don't have to manually setup Apache, PHP and MySQL on you dev machine. If you actually want to run your website for the public, setup Apache/IIS, MySQL and PHP manually, those products on there own are made for running in production. Or you can consider getting some cheap shared hosting somewhere, so you don't need to setup anything.

IIS7 (Windows) Authentication -- Cannot figure out why new website errors 401

I am trying to make a new website on an IIS server, of which has websites that are using Windows Authentication just fine. However, for the life of me, I cannot figure out why my new website refuses access (401.2)
Basically, I create a new website and add a single .html file ("Hello, World"). I can access it just fine. But turn off Anonymous, leaving on Windows Authentication, I get prompted for ID/PWD, ending always a 401.2
So, I decided to make a new website as a copy of the existing working website on the same webserver. I've even gone and made the new website share the same App Pool and the same Physical Path. This way, as far as I can tell, the only possible differences between the two websites is now the IIS configuration of the two sites. Still can't authenticate.
I've switched the bindings, doesn't help.
I've even compared the settings in applicationHost.config, making sure they're equal.
Any ideas? Thanks in advance.
I've used this article several times for problems like these with some success: http://blogs.msdn.com/b/david.wang/archive/2005/07/14/howto-diagnose-iis-401-access-denied.aspx Hope it helps!
I was advised to try running iisreset from the command line. This turns out to be what I needed all along. Seems some configuration changes do not get applied properly, even when restarting the particular website, until IIS itself is restarted.

Website sometimes gets jammed(timeout)

I'm hosting my website www.xgclan.com with the latest apache 2.4.1 and sometimes my server gets jammed, it doesn't seem to send any data but you don't get a timeout like when the Apache process isn't running.
A reboot of the process resolves this issue.
It seems to happen when you open the website in multiple browsers on the same system.
I've tested it on 2 different systems to make sure its not a bandwith or cpu problem.
Putting this without the quotes "AcceptFilter http none" in the httpd.conf fixed the issue for me.
I found the solution here: http://www.apachelounge.com/viewtopic.php?t=4543&postdays=0&postorder=asc&start=20

apache zombie processes on debian, what is the cause?

In top I keep seeing zombie processes (not more than one at a time), they disappear quickly (within 10 seconds), but a new zombie pops up a few seconds later. My server runs 3 sites, 2 written in PHP, one in Perl, all served by Apache . For the PHP sites I use mod_rewrite to create nice looking URLs. I having been trying to figure out which page or script causes these zombies, but can't find it. Is there a way to connect the PID of a process to the request it was executing?
To find out what causes the zombies I stopped the Perl site and one of the PHP sites, nothing changed, the zombies keep coming, so my best guess is that I have narrowed it down to one site, but then again, maybe it has nothing to do with a particular site I (I can't take the remaining site offline to check, since people are working with it).
I am running Debian on that server, this is the config:
Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny8 with Suhosin-Patch
mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0
Any help or pointing me in the right direction is greatly appreciated, I have been googling and trying things for days now (I learned a lot from it though ;-) ).
During the quiet Christmas holidays I had the opportunity to take the 3rd site offline for a couple of minutes. To my surprise I kept seeing zombies popping up, so it seems it has nothing to do with one site in particular but rather with some setting in Apache. Any ideas anyone?
I just answered a very similar question
Apache spawning zombie processes when php is called
the short answer is it's normal.
By enabling mod_status you'lle get some more details in the /status url of your server, and even the details of the last page served if you set the ExtendedStatus directive to "On". But you should not use that setting for a to long time in a production server.
Then I would like to know how do you know it's a zombie process? Are you sure it's not the 'normal' subprocess of apache, serving the client requests? How many subprocess do you have for your apache?