Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Apache web server won't start. org.apache.httpd.plist: Operation already in progress

After upgrading from Mavericks to Yosemite, Apache web server will not run when issuing the command sudo apachectl start. I get the message "org.apache.httpd.plist: Operation already in progress"


I am a web developer and a Mac newbie. No changes have been made to the .conf files. I had upgraded php when I was on Mavericks. The upgrade to PHP 6 was successful. I have created a username.conf file in the /etc/apache2/users folder so that I can create my web sites in my user directory. Again, all of this was working on Mavericks before I upgraded to Yosemite.


Now I just cannot start Apache. Any help would be appreciated.

iMac, OS X Yosemite (10.10), Apache web server

Posted on Oct 17, 2014 6:05 AM

Reply
22 replies

Oct 17, 2014 8:30 AM in response to Truper63

My web service was working fine on Mavericks as well. After upgrading to Yosemite apache sends these errors:


10/17/14 10:28:34.489 AM com.apple.xpc.launchd[1]: (org.apache.httpd) Please switch away from OnDemand to KeepAlive.

10/17/14 10:28:34.587 AM com.apple.xpc.launchd[1]: (org.apache.httpd[670]) Service exited with abnormal code: 1

10/17/14 10:28:34.587 AM com.apple.xpc.launchd[1]: (org.apache.httpd) Service only ran for 0 seconds. Pushing respawn out by 10 seconds.


Over, and over.


Any help?

Oct 20, 2014 12:40 AM in response to c2tarun

I've just fix my solution. the configuration of httpd and vhosts was corrupted after upgrading OS X to 10.10 (Yosemite).


Solution:

Please enter the following commands:

$ sudo apachectl stop $ sudo apachectl # without any parameter (stop/start/restart)

The second command will show the config errors and warning of httpd. My problem was about RubyOnRails config on new httpd service. it needs to configure again before starting apache service.

Oct 20, 2014 7:04 AM in response to SaeidZebardast

Thanks to your suggestion I've corrected my problem as well.


Despite the error messages in the log, the # without parameters command revealed that my problem was related to my PHP install. I use the package from php-osx.liip.ch (because I need mcrypt) instead of Apple's, and the Yosemite upgrade wiped it.


Solution:

I reinstalled the PHP package, restarted MySQL, and all was good.

Oct 20, 2014 7:11 AM in response to SaeidZebardast

Okay, your suggestion helped me in finding the error and I fixed the error by uncommenting the libphp5 module. But now I am facing a strange problem.


On running apachectl start I am able to see localhost page, on running apachectl stop I am still able to see localhost page.


Also I am able to see apache at two locations on my HDD. One at /etc/apache2 and other at /opt/local/apache2.


Can you please tell me how can I fix this?


--

Thanks

Oct 20, 2014 7:55 AM in response to SaeidZebardast

Taruns-MacBook-Pro:apache2 tarun$ ps aux | grep httpd

tarun 1298 0.0 0.0 2432772 500 s003 R+ 10:48AM 0:00.00 grep httpd

_www 1202 0.0 0.0 2477404 1688 ?? S 10:10AM 0:00.00 /usr/sbin/httpd

_www 1175 0.0 0.0 2477404 1700 ?? S 10:07AM 0:00.01 /usr/sbin/httpd

root 1174 0.0 0.1 2477404 7196 ?? Ss 10:07AM 0:00.22 /usr/sbin/httpd

Taruns-MacBook-Pro:apache2 tarun$ ps aux | grep apache

tarun 1300 0.0 0.0 2443012 680 s003 S+ 10:48AM 0:00.00 grep apache

Taruns-MacBook-Pro:apache2 tarun$



I installed apache2 using macports and then i uninstalled it. I checked /opt/local/apache2/bin folder and its almost empty. So I think somehow system's default apache is only working.


Also this might help:


Taruns-MacBook-Pro:apache2 tarun$ whereis apachectl

/usr/sbin/apachectl

Oct 25, 2014 7:08 PM in response to SaeidZebardast

This is what I get with the commands that you asked me to execute.


Shawns-iMac:~ shawn$ sudo apachectl stop

Shawns-iMac:~ shawn$ sudo apachectl #

httpd: Syntax error on line 527 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+php-osx.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _unixd_config\n Referenced from: /usr/local/php5/libphp5.so\n Expected in: /usr/sbin/httpd\n in /usr/local/php5/libphp5.so

Shawns-iMac:~ shawn$

Before I upgraded to Yosemite I had upgraded PHP on the iMac.

The command at line 527 is: Include /private/etc/apache2/other/*.conf

There are two files in this folder. They are +php-osx.conf, and php5.conf. It looks like +php-osx.conf is a shortcut.

Any help would be appreciated.

Oct 26, 2014 1:30 PM in response to SaeidZebardast

That resolved the issue of starting Apache server. Thank you for that.


Now I am unable to access my user Sites directory. I get 404 not found error. This worked prior to the Yosemite upgrade.

In httpd.conf I uncommented the following lines:

LoadModule userdir_module libexec/apache2/mod_userdir.so

Include /private/etc/apache2/extra/httpd-userdir.conf


In httpd-userdir.conf I uncommented:

Include /private/etc/apache2/users/*.conf


I created a shawn.conf file in Include /private/etc/apache2/users/ folder and it contains:

<Directory "/Users/shawn/Sites/">

Options Indexes MultiViews

AllowOverride All

Order allow,deny

Allow from all

</Directory>


I try to access a simple index.html file with localhost/~shawn and that is when I get the 404 error.


I also noticed that sudo apachectl # gives me the following warning:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Shawns-iMac.local. Set the 'ServerName' directive globally to suppress this message.

The ServerName parameter is commented out. I tried uncommenting and using ServerName localhost:80. This rid of the error but I still could not access my Sites root folder.

Any suggestions?

Apache web server won't start. org.apache.httpd.plist: Operation already in progress

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.