Apache does not start in MAMP (but MySQL works) on OSX

I had MAMP working for several months and recently installed PostgreSQL. He also recommended installing Apache, which I did to make sure PostgreSQL was working. Then I uninstalled PostgreSQL and the apache assembly and tried to restart MAMP. He activated the MySQL database (green light), but Apache did not start. I uninstalled and reinstalled MAMP only to solve the same problem.

Apache does not seem to register any errors in the MAMP folder, so without any errors tell me that I'm afraid of where to start fixing it. I hope this is due to the fact that I installed another version (and uninstalled it) that caused the problem, but I'm too inexperienced to know what I did.

Where can I find any errors if not in the MAMP folder? Not in:

  • / Applications / MAMP / Library / logs
  • / Applications / MAMP / bin / magazines
+49
apache mamp macos
Dec 13 '12 at 23:13
source share
16 answers

Stopping Apache solved this problem for me using the command line:

$ sudo apachectl stop 
+125
Jun 18 '14 at 1:55
source share

For those of you upgrading to Yosemite, there seems to be a bug that I really don't understand, but it’s easy to fix it as posted on their Twitter account.

Workaround for 10.10 Preview 5 error: rename the file "envvars" located in "/ Applications / MAMP / Library / bin" to "_envvars" (@mamp_en)

+44
Apr 27 '15 at 21:27
source share

I had a similar problem, and I could solve it by running apachectl included in MAMP from the command line:

 $ /Applications/MAMP/Library/bin/apachectl start 

what will give

 Syntax error on line 427 of /Applications/MAMP/conf/apache/httpd.conf: Invalid command '\xef\xbf\xbc#AllowOverride', perhaps misspelled or defined by a module not included in the server configuration 

This error message was nowhere to be found, and not in any log file or system console. (It turns out I copied a line from a documentation file that copied some special characters that were not intended for my system - how easy it is to find this!)

This is for MAMP 2.0.1, perhaps it is better at handling new versions.

+27
Aug 02 '14 at 10:40
source share

Perhaps this is because the original apache is included. Have you tried to see the status? You can try this command to stop its "apachectl status", and then restart the moms and see if it works.

+5
Dec 14 '12 at 20:33
source share

Change the recommended Apache port: port 80 to port 81.

+5
Feb 11 '14 at 19:38
source share

I know this is old, but in case someone else comes across this. I had a typo in my virtual host file (/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf), which caused Apache to not start. Only when I manually tried to run the Apache Apache version from the command line ( /Applications/MAMP/bin/startApache.sh ) did I see the error and was able to fix it.

+3
Jul 28 '14 at 1:15
source share

In my case there was an invalid ssl certificate on vhost. To check, just temporarily disconnect ssl from your entire ssl host and see if it starts. NOTE: even if ssl vhost is not installed.

+3
Feb 10 '15 at 14:14
source share

I had the same problem. After much disappointment with the lack of a descriptive error message, I realized that I could check the All Messages log in the Applications / Tools / System Messages section (or some similar path as I just translated from my language here). There I found an explanation, which in my case meant that the link to the library was broken (possibly due to the removal of postgres). I fixed this by recreating the link. In my case, this meant that I had to run the following command in the terminal:

 sudo ln -s /usr/lib/libpq.5.3.dylib /usr/lib/libpq.5.dylib 

and now it works!

+2
Mar 08 '13 at 22:59
source share

If at some point it works fine, I think something else on your network is currently using the same port for something else.

I also had this problem: in my case, I changed the default MAMP Apache port from 8888 to 80. It worked fine until I installed the web server on another machine on my network and changed / etc / hosts on my local machine to enable a new server. This meant that port 80 was already in use and the Apache MAMP failed to start.

The solution was to either stop the second web server on my network, or return MAMP back to 8888. Both approaches worked fine.

+2
Feb 15 '14 at 23:06
source share

The command line helps with this problem. as shown below

/ Applications / MAMP / Library / bin / apachectl start

/ Applications / MAMP / Library / bin / apachectl stop

+2
Jun 28 '15 at 16:38
source share

1) Close MAMP

2) Use the command line to run:

 $ sudo apachectl restart 

3) Open MAMP and start Apache

4) Apache should start this time with luck




My situation was that when I used the running command line:

 $ sudo apachectl stop 

nothing changed. And when I used the command line to run:

 $ sudo apachectl start 

I received a message

 httpd (pid 600) already running 

I tried to restart and it worked.

+2
Jul 27 '17 at 14:11
source share

To fix this problem, I reinstalled PostgreSQL and the Apache assembly that came with it, then I installed MAMP again and MAMP worked fine.

+1
Dec 17
source share

If your htdocs (or equivalent) folder is stored in external storage, you may need to connect to it (in finder or using cmd + K) before starting apache.

+1
Aug 26 '14 at 12:07 on
source share

I had this problem and it turned out that the .txt file, which was not a vhosts file, was somehow saved in my sites-available folder, which Apache automatically included, and expected each file to be a vhosts file.

+1
Jan 18 '15 at 16:48
source share

I went through all the Stackoverflow posts, but no luck. Finally, I came across this: https://www.speakinginbytes.com/2013/02/mamp-problems/

Sometimes Apache installs through MAMP to open a specific folder, and that folder no longer exists. If you just go to MAMP and change it with the settings button you can fix it.

This is a trick for me. Hope this helps someone else!

+1
Mar 28 '17 at 21:22
source share

Also make sure that you do not run an older version of MAMP. This happened to me by using a searchlight to find the MAMP. When the application is updated, it stores old copies in the Applications folder.

0
Feb 03 '16 at 17:01
source share



All Articles