mirror of
https://github.com/linuxserver/docker-diskover.git
synced 2026-01-18 18:52:19 +08:00
44 lines
977 B
Plaintext
44 lines
977 B
Plaintext
## Version 2018/11/09 - Changelog: https://github.com/linuxserver/docker-diskover/commits/master/root/defaults/default
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
|
|
listen 443 ssl;
|
|
|
|
root /app/diskover-web/public;
|
|
index index.php index.html index.htm;
|
|
|
|
server_name _;
|
|
|
|
ssl_certificate /config/keys/cert.crt;
|
|
ssl_certificate_key /config/keys/cert.key;
|
|
|
|
client_max_body_size 0;
|
|
|
|
error_page 599 = @noauth;
|
|
|
|
location / {
|
|
if (!-f /config/nginx/.htpasswd) {
|
|
return 599;
|
|
}
|
|
auth_basic "Restricted";
|
|
auth_basic_user_file /config/nginx/.htpasswd;
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
location @noauth {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
# With php5-cgi alone:
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
# With php5-fpm:
|
|
#fastcgi_pass unix:/var/run/php5-fpm.sock;
|
|
fastcgi_index index.php;
|
|
include /etc/nginx/fastcgi_params;
|
|
|
|
}
|
|
}
|