# Suggestions for small web server



## balanga (Aug 3, 2018)

Can anyone suggest a small, easy to configure web server - not apache or nginx... I would like to install something on pfSense so that I can retrieve a few files using http but don't want to interfere with the existing web server.


----------



## Phishfry (Aug 3, 2018)

www/lighttpd is really light.

Installing it on pfSense is a bit silly.


----------



## Phishfry (Aug 3, 2018)

Once again this is the excellent use case for a static compile. Don't pollute pfSense.

Why not SSH in and grab your files? sysutils/gigolo works just like WinSCP.


----------



## balanga (Aug 3, 2018)

Phishfry said:


> Once again this is the excellent use case for a static compile. Don't pollute pfSense.
> 
> Why not SSH in and grab your files? sysutils/gigolo works line WinSCP.



It needs to be automated....

I have a PXE server with Clonezilla being one of the options. It has a menuentry of

```
LABEL Clonezilla
    MENU LABEL Clonezilla
    TEXT HELP
    Backup and Restore Program
    ENDTEXT
    kernel images/clonezilla/live/vmlinuz
    append initrd=images/clonezilla/live/initrd.img boot=live username=user union=overlay components noswap noprompt vga=788 keyboard-layouts=en locales=en_GB.UTF-8 fetch=http://192.168.1.11/images/clonezilla/live/filesystem.squashfs
```
That includes this bit where I need access to a webserver:-


> fetch=http://192.168.1.11/images/clonezilla/live/filesystem.squashfs


----------



## SirDice (Aug 3, 2018)

balanga said:


> I would like to install something on pfSense


You've been around long enough to be well aware of this: PC-BSD, FreeNAS, NAS4Free, and all other FreeBSD Derivatives


----------



## balanga (Aug 3, 2018)

SirDice said:


> You've been around long enough to be well aware of this: PC-BSD, FreeNAS, NAS4Free, and all other FreeBSD Derivatives


In fairness, it was about a lightweight webserver and the question only mentioned pfSense in passing and did ask for advice regarding pfSense.


----------



## drhowarddrfine (Aug 3, 2018)

I was hesitant to answer for the reason above but I'm a little confused by the request for a server that "retrieves files". I've been using www/h2o which is light weight, very fast, and might do what you want.


----------



## Phishfry (Aug 3, 2018)

Over here it sounds absurd you want to run a second webserver on your firewall.
Nothing could go wrong there.


----------



## nihr43 (Aug 3, 2018)

pfsense has a tftp server available in the gui package manager.  can you get away with fetch=tftp://192.168.1.11/images/clonezilla/live/filesystem.squashfs ?


----------



## balanga (Aug 3, 2018)

nihr43 said:


> pfsense has a tftp server available in the gui package manager.  can you get away with fetch=tftp://192.168.1.11/images/clonezilla/live/filesystem.squashfs ?



Thanks, never thought of that but will give it a try. I was simply copying instructions from somewhere without thinking about alternatves.
Sometimes when you've spent  so much time trying to get something to work, you're scared of breaking it.With clonezilla the option line is so long that it is easy to make mistakes.


----------



## Phishfry (Aug 3, 2018)

In reality pf does not care what application needs port 80. So you should be safe there, but 2 webservers on the same port?
That's not feasible so then you need to change the default port of your secondary webserver. pf should still be fine.
Outside calls will be blocked. Inside will work.
I just think it's bad network hygene to run 2 webservers on a firewall.


----------



## balanga (Aug 3, 2018)

Phishfry said:


> In reality pf does not care what application needs port 80. So you should be safe there, but 2 webservers on the same port?
> That's not feasible so then you need to change the default port of your secondary webserver. pf should still be fine.
> Outside calls will be blocked. Inside will work.
> I just think it's bad network hygene to run 2 webservers on a firewall.



I would put the file in nginx's data area if I knew where to put it, but that would probably mean messing with pfSense's configuration. I just need a way of retrieving a file on a remote localhost which runs 24/7.

It may be an idea to use tftp as nihr43 suggested.


----------



## balanga (Aug 3, 2018)

balanga said:


> Thanks, never thought of that but will give it a try. I was simply copying instructions from somewhere without thinking about alternatves.
> Sometimes when you've spent  so much time trying to get something to work, you're scared of breaking it.With clonezilla the option line is so long that it is easy to make mistakes.



I tried it and managed to get it working manually after first specifying 'mode binary'. Not sure if that can be specified using fetch=tftp://host/file ...


----------

