Apache2 Won't Start on Startup

Rob Wilkerson rob at robwilkerson.org
Fri Feb 5 02:36:58 PST 2010


On Thu, Feb 4, 2010 at 4:23 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
> Apache doesn't know which user's home directory you'd like it to use. Apache starts as root, then switches to the _www user; it has no idea what user you're currently logged in and using the computer as. I'm not sure of a way that it could automatically determine that either, and I also don't know of a way to use variables in the path of an Apache Include statement.

That makes sense. It seems to be fine when I manually start Apache
using 'sudo apachectl start', so I guessed that it was something
specific to the boot process.

> You may have to settle for this:
>
> Include "/Users/*/Dropbox/Application Support/apache/conf.d.osx/*.conf"
> Include "/Users/*/Library/Application Support/MacPorts/apache/conf.d/*.conf"
>
> This would include conf files in *every* user's home directory in that location. But if you're the only person using these computers (the only user account on these computers, or the only user which has conf files in that location) then it shouldn't be a problem.

Unfortunately, that doesn't seem to work:

httpd: Syntax error on line 512 of /opt/local/apache2/conf/httpd.conf:
Wildcard patterns not allowed in Include /Users/*/Dropbox/Application
Support/apache/conf.d.osx/*.conf

Thanks again for your help.

-- 
Rob Wilkerson
http://robwilkerson.org
@robwilkerson


More information about the macports-users mailing list