Nginx plugin as a webserver to serve directory

Started by stanthewizzard, February 22, 2021, 03:37:58 PM

Previous topic - Next topic
Hello All

I would like to use the nginx plugin as a simple webserver to list a directory and make file donwloadable.

I don't understand how.


Thank you very much

hi
don't think it's possible via GUI only.
you can create a location without specifying upstream via GUI, but the rest of the configuration will have to be done by hands via the hook in location block


February 22, 2021, 07:34:23 PM #3 Last Edit: February 23, 2021, 11:29:10 AM by Fright
need to add hook to location template (like https://forum.opnsense.org/index.php?topic=21154.msg99523#msg99523)
then create dir(s) for your location(s) post conf file(s) and put your conf(s) with needed directives there.
(https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/)

and also
https://docs.opnsense.org/manual/how-tos/nginx_hosting.html

but, if i may, imho the fact that it is technically possible does not make it a better idea