No description
Find a file
Aroy-Art 2f99ed9703
Some checks failed
Publish Docker rootless image / Push Docker image to Docker Hub (push) Failing after 1m44s
Publish Docker image / Push Docker image to Docker Hub (push) Failing after 38s
Change: font to "Roboto Mono"
2024-04-01 22:24:21 +02:00
.github/workflows Test to set docker image to docker in docker 2024-03-25 20:02:41 +01:00
.idea feat(theme): add theme switching functionality 2022-02-07 16:55:50 +01:00
assets feat(theme): add theme switching functionality 2022-02-07 16:55:50 +01:00
css Change: font to "Roboto Mono" 2024-04-01 22:24:21 +02:00
image Change folder icon 2024-03-28 22:35:05 +01:00
js Add: README.md preview 2024-03-27 15:39:24 +01:00
node_modules Add: npm zero-md package 2024-03-27 14:37:57 +01:00
.gitattributes Normalize EOL for all files that Git considers text files 2024-02-08 17:18:30 +01:00
.gitignore feat(theme): add theme switching functionality 2022-02-07 16:55:50 +01:00
default-rootless.conf Add 2 image variants (root & rootless) 2022-04-08 13:51:48 +02:00
default.conf Add 2 image variants (root & rootless) 2022-04-08 13:51:48 +02:00
Dockerfile Add 2 image variants (root & rootless) 2022-04-08 13:51:48 +02:00
Dockerfile-rootless Add 2 image variants (root & rootless) 2022-04-08 13:51:48 +02:00
favicon.png Add new favicon 2024-02-08 17:12:51 +01:00
index.html Add: load zero-md model for md rendering 2024-03-27 17:13:12 +01:00
LICENSE adding license and readme 2016-02-12 08:58:41 +01:00
README.md Merge branch 'master' 2024-02-08 17:05:05 +01:00

ISO-Share

This web application is a very simple file browser which can be used effectively together with nginx's autoindex module.

nginx file browser in action - light theme nginx file browser in action - light theme

A sample nginx configuration is also included which mounts file browser under root (/) and mounts files to be listed under /files path. Hence is the filesBaseUrl under

Using with docker

Mainly for demonstration purposes a docker image is also available here. In order to use this docker image, the volume which has to be served should be mounted under /opt/www/files/ and port 80 (root) or 8080 (rootless)) of container shall be mapped to a proper port on host. A proper run would look like:

root

$ docker run -p 8080:80 -v /path/to/my/files/:/opt/www/files/ mohamnag/nginx-file-browser

rootless:

$ docker run -p 8080:8080 -v /path/to/my/files/:/opt/www/files/ mohamnag/nginx-file-browser

With container up and running you can point your browser to IP of docker host with given port to view the files. For example with above run command assuming docker host having IP with 192.168.0.200 we have to navigate to this URL:

http://192.168.0.200:8080

Be very careful with symlinks, they can expose very important files of system to outside world!

If you have symlinks inside files dir that you want to be able to browse too, the alias path where /files is served by nginx has to be changed to match the same path outside your docker container. Lets say I have a directory with path /home/myuser/files-to-serve/. Which has two directories named dir1 and dir2. where dir1 is nothing more than a symlink to dir2. In order to be able to browse dir1 (inside dir2) on file browser, following have to be done:

Inside default.conf this line

    alias /opt/www/files/;

shall be changed to

    alias /home/myuser/files-to-serve/;

And the mounting point is now /home/myuser/files-to-serve/ instead of /opt/www/files/.

ISO-Share