Basic web server on FreeNAS

Status
Not open for further replies.

sirjorj

Dabbler
Joined
Jun 13, 2015
Messages
42
I've been looking into running a basic web server and from what I read, it is frowned upon to make your FreeNAS box web-facing. I need it for a different reason however - to do network installs of OpenBSD.

In the past, I used a different NAS for the TFTP to PXE-boot the installer. When it needed to download the files, I would just point them to my NAS and it would pull them via FTP. Well a while back, OpenBSD removed the ftp client from the installer, so http was now the way to go. I was never able to get the webserver working on my old NAS, but now that i have FreeNAS up and running, i want to give it a try again. I have the OpenBSD files on a dataset. How hard would it be to set up a simple web server (probably in a jail, from what I've read) and point it to the right directory in the right dataset? Where do I read to learn how to do this?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
You could indeed use a jail, which is essentially a self-contained FreeBSD system, so if you do a web search for 'famp server' or 'famp stack' you should find what you need. The guides on Digital Ocean are well-respected, but there are many others.

Another option is running Linux in a VM in a VirtualBox jail (in which case you would search for 'lamp server' or 'lamp stack').
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
You can set up a jail with a web server and make it internet facing. The biggest concern is securing it.

As long as you are willing to do the research to properly secure and harden your web server then by all means go for it.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
I've been looking into running a basic web server and from what I read, it is frowned upon to make your FreeNAS box web-facing. I need it for a different reason however - to do network installs of OpenBSD.

In the past, I used a different NAS for the TFTP to PXE-boot the installer. When it needed to download the files, I would just point them to my NAS and it would pull them via FTP. Well a while back, OpenBSD removed the ftp client from the installer, so http was now the way to go. I was never able to get the webserver working on my old NAS, but now that i have FreeNAS up and running, i want to give it a try again. I have the OpenBSD files on a dataset. How hard would it be to set up a simple web server (probably in a jail, from what I've read) and point it to the right directory in the right dataset? Where do I read to learn how to do this?
1. Create jail.
2. Add 'storage' to jail pointing to your dataset that houses your files you need
3. Install web server software of choice (I prefer NGINX)
4. Enjoy?
 
Joined
Jan 9, 2015
Messages
430

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Do not use commas, which aren't necessary.

or

A panda walks into a café. He orders a sandwich, eats it, then draws a gun and proceeds to fire it at the other patrons.

"Why?" asks the confused, surviving waiter amidst the carnage, as the panda makes towards the exit. The panda produces a badly punctuated wildlife manual and tosses it over his shoulder.

"Well, I'm a panda," he says. "Look it up."

The waiter turns to the relevant entry in the manual and, sure enough, finds an explanation. "Panda. Large black-and-white bear-like mammal, native to China. Eats, shoots and leaves."
 
Last edited:
Status
Not open for further replies.
Top