Solved

Apache2 won't start - how to troubleshoot?

Posted on 2013-06-10
4
934 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now