apache question

wonderflu

Junior Member
Nov 23, 2007
24
0
0
I just got a shiny new mac mini to use as an HTPC. I like being able to start things playing from elsewhere in the house, so I have apache running as a user instead of www. I used some php so that I can go to it's address, see a list of all the movies/etc and start one playing with a click. Apache is running as the user I have logged in all the time, so the php can actually launch VLC and a copy starts running in the GUI.

The problem is that I'd also like to be able to use the mini as a webserver to the internet. It seems like running apache as a local, privileged user is a bad idea, so I would like to run 2 instances of apache:

1 running as www, listening on port 80, and
1 running as myuser, listening on some other port, so that I can start VLC remotely.

Is that a valid solution to my problem? How would I go about implementing it?
 

ultimatebob

Lifer
Jul 1, 2001
25,134
2,450
126
Sure, that would work. You just need to edit the httpd.conf file to change the default port number and user account that each Apache instance is running under. Fortunately, it's a well documented file, so it shouldn't be that hard to figure out what to change once you find that file under the conf folder. You'll probably also need to change the permissions on some of the files for the public-facing web server so it works right with the non-privileged www user.

Of course, you'll also want to run this behind a router with a firewall and set up port forwarding so incoming port 80 requests get sent to your Mac Mini.

That said, you might want to ask for additional help in the *nix Software forum, since this seems like more of a generic UNIX issue than an Apple one.