Solved

Apache2 won't start - how to troubleshoot?

Posted on 2013-06-10
4
948 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

756 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