mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Added default HTTPs site.
This commit is contained in:
parent
eaebc48f66
commit
20fd185652
@ -36,3 +36,17 @@ server {
|
|||||||
root /var/www/html;
|
root /var/www/html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Default 443 Host
|
||||||
|
server {
|
||||||
|
listen 443 ssl default;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
access_log /data/logs/default.log proxy;
|
||||||
|
|
||||||
|
ssl_certificate /data/nginx/dummycert.pem;
|
||||||
|
ssl_certificate_key /data/nginx/dummykey.pem;
|
||||||
|
ssl_ciphers aNULL;
|
||||||
|
|
||||||
|
return 444;
|
||||||
|
}
|
||||||
|
@ -21,5 +21,19 @@ chown root /tmp/nginx
|
|||||||
# Dynamically generate resolvers file
|
# Dynamically generate resolvers file
|
||||||
echo resolver $(awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ";" > /etc/nginx/conf.d/include/resolvers.conf
|
echo resolver $(awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ";" > /etc/nginx/conf.d/include/resolvers.conf
|
||||||
|
|
||||||
|
# Generate dummy self-signed certificate.
|
||||||
|
if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]
|
||||||
|
then
|
||||||
|
openssl req \
|
||||||
|
-new \
|
||||||
|
-newkey rsa:2048 \
|
||||||
|
-days 3650 \
|
||||||
|
-nodes \
|
||||||
|
-x509 \
|
||||||
|
-subj '/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost' \
|
||||||
|
-keyout /data/nginx/dummykey.pem \
|
||||||
|
-out /data/nginx/dummycert.pem
|
||||||
|
fi
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
exec nginx
|
exec nginx
|
||||||
|
Loading…
Reference in New Issue
Block a user