Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Apache2 won't start - how to troubleshoot?

Posted on 2013-06-10
4
Medium Priority
?
988 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 2000 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 Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

916 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