Apache is Not Running

From AMPPS Wiki
Jump to: navigation, search

Windows

Default Server

On windows 8 and 10 default IIS server is installed and it uses port 80. You need to stop IIS server to Run Ampps Apache.

To stop IIS server follow this:

  • Open Run Box by pressing windows key + R then type services
  • Search for World wide Web Publishing Service If it is not present then search for Web Deployment Agent Service.

World wide Web Publishing Service.png

  • Right click and select Properties option.

Www propertis.png

  • Click on Stop and set auto startup to manual.


Port 80 is held By Another Process

If you are getting the message "Apache port is being used by other application", Follow below details for solution.

  • Open command prompt(start -> run -> cmd) and type the following command :

C:\> netstat -aon | findstr 0.0:80

  • Last column of the output is the PID of the application using port 80. Eg. 3420 is the PID of application using port 80.
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       3420
  • You can find the application name in Task Manager. Go to Process Tab then in Menu Bar of Task Manager go to View -> Select Column -> Check "PID" and press Ok.
  • Search for the PID in the process list(Click Below "Show processes from all users" in case if you don't find the PID), corresponding process is the application which is using port 80. Stop or Uninstall it to make your AMPPS Apache work.
  • Apache crashes/Side by side configuration error(Generally in Windows Server). By downloading Microsoft VC++ Redistributable Package 2008(x86) this could be solved.
  • Incorrect httpd.conf. We can always find why Apache din't work by running the following command in command prompt(Start -> Run -> cmd):
"path/to/Ampps/apache/bin/httpd.exe"

The above commands starts Apache if everything is correct, else it will throw an error.

Mac OS X

Default Server

Mac OS comes with LAMP stack so default Apache is already installed on /usr/bin or /usr/sbin location. To stop default Apache open terminal and run following commands.

sudo apachectl -k stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo killall httpd

Port 80 is held By Another Process

  • It could be due to a port conflict i.e some other application or web server must be using port 80. Make sure that no other Application is listening on port 80. You can use Port Scan Feature of Network Utility to check which Application is listening on port 80.
  • Incorrect httpd.conf. We can always find why Apache din't work by running the following command in Terminal:
sudo /Applications/AMPPS/apache/bin/httpd
  • The above commands starts Apache if everything is correct, else it will throw an error.