Added nginx config
This commit is contained in:
33
README.md
33
README.md
@@ -1,11 +1,42 @@
|
||||
# NginxAutoIndex
|
||||
|
||||
## General setup
|
||||
run the following commands
|
||||
Run the following commands
|
||||
```
|
||||
mkdir -p /var/www/autoindexTheme
|
||||
wget https://git.bprieshof.nl/DarkTheme/NginxAutoIndex/raw/branch/main/theme.html -O /var/www/autoindexTheme/theme.html
|
||||
```
|
||||
## Setup Auto Index as nginx root
|
||||
Nginx site config-file
|
||||
```
|
||||
location /downloads/theme/ {
|
||||
alias /var/www/autoindexTheme/;
|
||||
}
|
||||
|
||||
location /downloads{
|
||||
alias /var/www/downloads/;
|
||||
add_before_body "/downloads/theme/theme.html";
|
||||
autoindex on;
|
||||
autoindex_localtime on;
|
||||
autoindex_exact_size off;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Setup Auto Index as nginx sub-dir
|
||||
Nginx site config-file
|
||||
```
|
||||
root /var/www/downloads
|
||||
|
||||
location /theme/ {
|
||||
alias /var/www/autoindexTheme/;
|
||||
}
|
||||
|
||||
location / {
|
||||
add_before_body "/theme/theme.html";
|
||||
autoindex on;
|
||||
autoindex_localtime on;
|
||||
autoindex_exact_size off;
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user