Lets Encrypt friendliness
This commit is contained in:
@@ -6,4 +6,4 @@ sudo docker run -it --rm --name certbot \
|
|||||||
deliverous/certbot \
|
deliverous/certbot \
|
||||||
certonly \
|
certonly \
|
||||||
--webroot --webroot-path=/data/letsencrypt \
|
--webroot --webroot-path=/data/letsencrypt \
|
||||||
-d openrsc.com -d www.openrsc.com --staging
|
-d localhost -d www.localhost --staging
|
||||||
@@ -8,17 +8,15 @@ services:
|
|||||||
- "./etc/nginx:/opt/bitnami/nginx/conf/vhosts"
|
- "./etc/nginx:/opt/bitnami/nginx/conf/vhosts"
|
||||||
- "./Website:/opt/bitnami/nginx/html"
|
- "./Website:/opt/bitnami/nginx/html"
|
||||||
- "./etc/logs/nginx:/opt/bitnami/nginx/logs"
|
- "./etc/logs/nginx:/opt/bitnami/nginx/logs"
|
||||||
#- "./etc/logs/letsencrypt:/var/log/letsencrypt"
|
- "./etc/letsencrypt/certs:/opt/bitnami/nginx/conf/bitnami/certs"
|
||||||
#- "./etc/letsencrypt/certs:/etc/letsencrypt"
|
- "./etc/nginx/fastcgi.conf:/bitnami/nginx/conf/fastcgi.conf"
|
||||||
#- "./etc/letsencrypt/data:/data/letsencrypt"
|
|
||||||
ports:
|
ports:
|
||||||
- "80:8080"
|
- "80:8080"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
environment:
|
environment:
|
||||||
- NGINX_HOST=${NGINX_HOST}
|
- NGINX_HOST=${NGINX_HOST}
|
||||||
#- VIRTUAL_HOST=localhost
|
- LETSENCRYPT_HOST=localhost
|
||||||
#- LETSENCRYPT_HOST=localhost
|
- LETSENCRYPT_EMAIL=your.email@here.com
|
||||||
#- LETSENCRYPT_EMAIL=your.email@here.com
|
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
myadmin:
|
myadmin:
|
||||||
@@ -117,6 +115,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "./etc/php/php.ini:/opt/bitnami/php/etc/conf.d/php.ini"
|
- "./etc/php/php.ini:/opt/bitnami/php/etc/conf.d/php.ini"
|
||||||
- "./Website:/app"
|
- "./Website:/app"
|
||||||
|
- "./etc/logs/php:/opt/bitnami/php/log"
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx
|
- nginx
|
||||||
|
|
||||||
|
|||||||
0
etc/logs/php/.gitkeep
Normal file
0
etc/logs/php/.gitkeep
Normal file
@@ -47,16 +47,20 @@ server {
|
|||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/index.php;
|
||||||
}
|
}
|
||||||
|
|
||||||
####### Proxies #######
|
####### Proxies #######
|
||||||
# PHP proxy
|
# PHP proxy
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
fastcgi_pass php:9001;
|
||||||
proxy_set_header X-Forwarded-Server $host;
|
fastcgi_index index.php;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
include fastcgi.conf;
|
||||||
proxy_pass http://php;
|
root /app;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.htm$ {
|
||||||
|
root /opt/bitnami/nginx/html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ghost proxy
|
# Ghost proxy
|
||||||
@@ -78,8 +82,9 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Certbot for HTTPS cert renewal
|
# Certbot for HTTPS cert renewal
|
||||||
location ~ ^/.well-known {
|
location ~ /.well-known {
|
||||||
root /data/letsencrypt/;
|
root /opt/bitnami/nginx/html;
|
||||||
|
allow all;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ server {
|
|||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/index.php;
|
||||||
}
|
}
|
||||||
|
|
||||||
####### Proxies #######
|
####### Proxies #######
|
||||||
@@ -30,6 +30,11 @@ server {
|
|||||||
fastcgi_pass php:9001;
|
fastcgi_pass php:9001;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi.conf;
|
include fastcgi.conf;
|
||||||
|
root /app;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.htm$ {
|
||||||
|
root /opt/bitnami/nginx/html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ghost proxy
|
# Ghost proxy
|
||||||
@@ -50,4 +55,9 @@ server {
|
|||||||
proxy_pass http://tomcat;
|
proxy_pass http://tomcat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~ /.well-known {
|
||||||
|
root /opt/bitnami/nginx/html;
|
||||||
|
allow all;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user