Apache2 Won't Start on Startup

Dan Poirier poirier at pobox.com
Thu Feb 4 15:28:07 PST 2010

On Thu, Feb  4, 2010, at 03:57:52 PM, Rob Wilkerson <rob at robwilkerson.org> wrote:

> I'm trying to share a httpd.conf file across two Macs via Dropbox
> (with symlinks in each Mac's /opt/local/apache2/conf/ directory).
> Similarly, I store virtual host conf files individually and include
> them in my main httpd.conf:
> Include "${HOME}/Dropbox/Application Support/apache/conf.d.osx/*.conf"
> Include "${HOME}/Library/Application Support/MacPorts/apache/conf.d/*.conf"
> Unfortunately, my username on each Mac is different (one is a work
> machine that I can't change) which is why I'm using the ${HOME}
> environment variable to tell Apache where to find the conf files. As
> far as I can tell, that's the root of this problem. Even though the
> LaunchDaemon is loaded, Apache won't start when I boot up. The system
> log reports that:
> Feb  4 07:05:01 robwilkerson org.macports.apache2[55]: httpd: Syntax
> error on line 512 of /opt/local/apache2/conf/httpd.conf: Include
> directory '/opt/local/apache2/${HOME}/Dropbox/Application
> Support/apache/conf.d.osx' not found

Assuming /opt/local is local to each system, you could set HOME (or some
other variable name) differently in /opt/local/apache2/bin/envvars on
each system.  That will set it in apache when starting.


More information about the macports-users mailing list