nginx.conf

Status
Not open for further replies.

ppmax

Contributor
Joined
May 16, 2012
Messages
111
Hi--

Im still getting up to speed with the standard procedures and best practices with FreeNAS...thus my question:
What is the best way to add a web directory to the nginx.conf file? I'd like to have nginx server up a directory index of my /mnt/volume1/media folder so I can browse my movies and music easily.

Should this modification be done to /conf/base/etc/local/nginx/nginx.conf ?
Do I need to mount -rw / first? (it looks like nginx.conf is rw for root as is)
I've done a ton of httpd.conf customization but am unfamiliar with nginx. Does anyone have a modified nginx.conf file they can share and explain?

thx
PP
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Since your are on 8.2 just add plugins jail. Then from within the jail just 'pkg_add -r nginx', it'll complain about dependencies so grab all of them first with pkg_add. then add 'nginx_enable=YES' to /etc/rc.conf in your jail as well.

It works =] and is the new preferred was to run stuff on freenas. If you want, you can even add something like owncloud (needs php + sqlite or mysql). Its a great way to browse files and add web permissions, I've been testing this a bit.
 

ppmax

Contributor
Joined
May 16, 2012
Messages
111
Thanks Joshua--

I've got a plugins jail all set up for minidlna and firefly. Those plugins use the host web server, correct? I didnt find any nginx.conf file within the jail--and don't want to stomp all over a perfectly good install ;)

ownCloud looks pretty sweet--thanks for the tip. Sounds like a perfect weekend project to decompress with (I'm on the computer at work all the time...but stuff like this relaxes me).

PS: I take it I can use nginx instead of apache2 for own cloud?

PPS: watching a couple of your vids got me stoked on FreeNAS and pfSense

cheers
PP
 
Status
Not open for further replies.
Top