I am trying to run the passenger-install-apache2-module
command and I keep getting this error:
ext/apache2/mod_passenger.c:25:10: fatal error: 'httpd.h' file not found
Not sure what happened to it, my local dev environment was fine until I upgraded to Mavericks - I had to update XCode and uninstall/reinstall the passenger gem.
I tried creating httpd.h
in the /etc/apache2
directory and pasting this in but that didn't work.
I've no idea how to replace this file
/usr/local/etc/httpd/extra/httpd-ssl.conf to 8443 so that httpd can run without sudo. And you are all set. Where is Apache httpd installed on my mac?
The cause is homebrew installs apache2/httpd in user accessible folders and runs as a user (by running the command: brew services start httpd). Not running as a regular user means httpd can not listen on privileged ports (1024 and below).
Not running as a regular user means httpd can not listen on privileged ports (1024 and below). So even if httpd.conf is configured to listen to 80 and 443, httpd can not receive requests through those ports. The peculiarity is when you start httpd by running the command: sudo apachectl start. This command starts httpd as root user.
I was having the same error. You need to:
Update/install xcode.
xcode-select --install
from the command line to reinstall the command line tools.It worked for me, hopefully for you too!
The update also commented out the line:
Include /private/etc/apache2/extra/httpd-vhosts.conf
So once I uncommented that it all loaded as normal.
** UPDATE FOR YOSEMITE **
In your /etc/apache2/httpd.conf
file you'll need to change:
<Directory />
AllowOverride none
Require all denied
</Directory>
To:
<Directory />
AllowOverride none
Require all granted
</Directory>
During the mavericks upgrade several configuration files were saved as previous and replaced by the install including:
/etc/apache2/httpd.conf~previous
/etc/group~previous
/etc/php.ini.default-5.2-previous
/etc/sshd_config~previous
/etc/syslog.conf~previous
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With