I've purchased an "old" Mac Mini (macmini2,1
) from a coworker to serve as a media server beneath my TV. It runs 10.7.5 and can't update any further, it's got a 1.83Ghz Core2Duo and 4Gb RAM, and I've stuffed a 128Gb Apple SSD in it.
I'm trying to install nginx
on it to act as a small home web server, to quickly share files with colleagues and host some development I'm doing. I'm used to do this on Debian installs, but it's the first time I'm doing it on OSX and I want to do things well.
So I've installed nginx
with Homebrew:
brew install nginx
and I'm trying to set it up so that:
- it loads at boot, without the need to login (via
/Library/LaunchDaemons
, though I'm not proficient with that yet) – can anybody help me with the plist? - it runs as
www-data
, notroot
– can anybody tell me which is the best way to create this user account? It does not need to be able to login through the window manager, it's just meant to be a unix account. Though I'd appreciate being able to connect to the mini with AFP as www-data and directly share the/var/www
(or equivalent) folder on my LAN, that'd help me drop files easily. Probably/usr/local/var/www
from what I understand. Again, I'm accustomed to doing that with Debian (with the help ofnetatalk
andavahi
).
What's the best setup for doing this? Directory structures, configuration files?
Any pointer appreciated for the nginx.conf
too, cause the stock config provided by Homebrew is quite different from what I'm used to on Debian.
Also, won't it conflict with the stock Apache? I want to run it on port 80 (and eventually make it available to the whole world).
(PHP would be welcome too, but for now I just want a solid, plain old webserver, before adding PHP to it).
[Note: I'd rather tag this question nginx
, but I can't as I haven't earned enough rep here. Can somebody tag it for me?]