1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

update nextcloud

This commit is contained in:
kev 2016-11-05 10:43:27 +08:00
parent c2052b1d09
commit 17db7d2550
5 changed files with 18 additions and 1 deletions

View File

@ -20,6 +20,7 @@ nginx:
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf - ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./ssl:/etc/nginx/ssl
volumes_from: volumes_from:
- nextcloud - nextcloud
net: host net: host

View File

@ -12,6 +12,7 @@ nginx:
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf - ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./ssl:/etc/nginx/ssl
volumes_from: volumes_from:
- nextcloud - nextcloud
net: host net: host

View File

@ -1,6 +1,21 @@
server { server {
listen 80; listen 80;
server_name cloud.easypi.info; server_name cloud.easypi.info;
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl;
server_name cloud.easypi.info;
ssl_certificate /etc/nginx/ssl/nextcloud.crt;
ssl_certificate_key /etc/nginx/ssl/nextcloud.key;
ssl_session_timeout 5m;
ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL';
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
# Add headers to serve security related headers # Add headers to serve security related headers
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;"; add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
@ -49,7 +64,7 @@ server {
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS off; fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
fastcgi_pass 127.0.0.1:9000; fastcgi_pass 127.0.0.1:9000;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;

View File

View File