Solved

Apache2 won't start - how to troubleshoot?

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

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 17

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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

17 Experts available now in Live!

Get 1:1 Help Now