Fix: README markdown styling errors
Some checks failed
Publish Docker image / Push Docker image to Docker Hub (push) Failing after 1m19s
Some checks failed
Publish Docker image / Push Docker image to Docker Hub (push) Failing after 1m19s
This commit is contained in:
parent
ad63672ffd
commit
336a025918
1 changed files with 24 additions and 12 deletions
36
README.md
36
README.md
|
@ -5,14 +5,16 @@ effectively together with [nginx's autoindex module](http://nginx.org/en/docs/ht
|
|||
|
||||

|
||||
|
||||
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
|
||||
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](https://hub.docker.com/r/mohamnag/nginx-file-browser/).
|
||||
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:
|
||||
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
|
||||
|
||||
|
@ -26,24 +28,34 @@ rootless:
|
|||
docker run -p 8080:8080 -v /path/to/my/files/:/opt/www/files/ git.aroy-art.com/aroy/nginx-file-browser:latest
|
||||
```
|
||||
|
||||
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`
|
||||
|
||||
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.1.200` we have to navigate to this
|
||||
URL: `http://192.168.1.200:8080`
|
||||
|
||||
## Symlinks
|
||||
|
||||
> Be very careful with symlinks, they can expose very important files of system to outside world!
|
||||
> 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:
|
||||
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
|
||||
```
|
||||
|
||||
```Nginx
|
||||
alias /opt/www/files/;
|
||||
```
|
||||
|
||||
shall be changed to
|
||||
```
|
||||
|
||||
```Nginx
|
||||
alias /home/myuser/files-to-serve/;
|
||||
```
|
||||
|
||||
|
@ -67,4 +79,4 @@ docker image push git.aroy-art.com/aroy/iso-share:latest
|
|||
|
||||
## Attribution
|
||||
|
||||
This is a fork from [mohamnag/nginx-file-browser](https://github.com/mohamnag/nginx-file-browser)
|
||||
This is a fork from [github.com/mohamnag/nginx-file-browser](https://github.com/mohamnag/nginx-file-browser)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue