Solved

Apache2 won't start - how to troubleshoot?

Posted on 2013-06-10
4
944 Views
Last Modified: 2013-06-11
Hi,

Apache2 (used for TrendMicro OfficeScan Server) was working fine on Server 2012 STD X64, I then installed TrendMicro Control Manager which wants IIS (so I installed IIS), after a reboot Apache would not start, I then went to Roles and Features and removed IIS again, but Apache2 still won't start and does not give a lot of detail in the Application Log File,

How does one troubleshoot Apache2 to try and figure out why it won't start? I know there's a .conf file, but not sure what to look for or change in there to make it work after IIS broke it.

Thanks for any guidance.

Reinhard
0
Comment
Question by:ReinhardRensburg
  • 2
  • 2
4 Comments
 
LVL 18

Expert Comment

by:LesterClayton
ID: 39236908
You first want to make sure that nothing else is listening on port 80 - open up an elevated command prompt and type "netstat -nato"

You'll see something like this:

Proto  Local Address          Foreign Address        State           PID      Offload State

TCP    0.0.0.0:80            0.0.0.0:0              LISTENING       2536     InHost
TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       792      InHost

Open in new window


Look for one which has :80 next to it - and LISTENING. The 2536 in my screenshot refers to the Process ID.  If you open up task manager, go to Processes tab, select View -> Select Columns and then check PID (Process Identifier), it will show you all processes and their identifiers.  Sort by PID, then match the numbers, and you have your culprit.

Once you ascertain which process is hogging this port, you can find the service which starts it, and then stop and disable the service.

Of course, it's always possible that apache is already listening on this port, in which case your problem is specifically with apache.  Let us know how you get on.
0
 

Author Comment

by:ReinhardRensburg
ID: 39236928
Hi LesterClayton,

Thanks for your reply,

I had a look and it seems like there's nothing listening on port 80 at this stage, please see attached .txt file with the results of netstat -nato on the Server.

I've got a suspicion that it might be Apache2 that is a bit upset about the IIS that was on the Server, not sure why it's still upset even though I've uninstalled IIS again.

Please also see some screen shots of the Apache2 service start error and event log error.

Thanks,
Reinhard
netstat.txt
Apache2-1.PNG
Apache2-2.PNG
Apache2-3.PNG
0
 
LVL 18

Accepted Solution

by:
LesterClayton earned 500 total points
ID: 39236941
It looks like Apache is crashing when it's trying to load the php exetensions, based on the screenshot you've given with Apache2-2.PNG.  It seems like the other installation made some modifications to your PHP environment, including (but not limited to) adding more extensions.

Find your php.ini file, make a copy of it and then restore a previous backup copy over this one - then try to start up apache again.  If you don't have a backup copy, then you're going to have to try to comment out some of the extensions that it loads.  Usually when php.ini is modified, new extensions are added at the bottom of the file.  Look for lines similar to:

extension=php_exif.dll

Start commenting them out from the bottom up, by adding a semicolon in front of them, so it will look similar to this:

;extension=php_exif.dll

Repeat until Apache starts, then you know which extension is causing it to crash.  See if your web site works with all the commented out extensions.  You do not need to reboot the server after each modification and save you make, so this should be a pretty quick job.  

Of course, if you are able to restore your whole PHP folder, this would be preferable.
0
 

Author Comment

by:ReinhardRensburg
ID: 39236968
Thanks LesterClayton,

You'r the man !! - it worked :)

I commented out the last extensions until it started.

Regards,
Reinhard
Apache-Working.PNG
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question