From e3f744ed10cc216f586420a90823de8e410160fb Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Thu, 7 Jul 2016 00:46:32 +0300 Subject: [PATCH] =?UTF-8?q?Nginx=20=D1=83=D0=B4=D0=B0=D0=BB=D1=91=D0=BD=20?= =?UTF-8?q?=D0=B7=D0=B0=20=D1=81=D0=B2=D0=BE=D0=B5=D0=B9=20=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=D0=B4=D0=BE=D0=B1=D0=BD=D0=BE=D1=81=D1=82=D1=8C?= =?UTF-8?q?=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 7 ---- docker/nginx/Dockerfile | 8 ---- docker/nginx/nginx.conf | 31 -------------- docker/nginx/skinsystem.ely.by.conf | 63 ----------------------------- 4 files changed, 109 deletions(-) delete mode 100644 docker/nginx/Dockerfile delete mode 100644 docker/nginx/nginx.conf delete mode 100644 docker/nginx/skinsystem.ely.by.conf diff --git a/docker-compose.yml b/docker-compose.yml index 0e31b24..99380c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,15 +4,8 @@ services: build: . links: - redis - - web: - build: ./docker/nginx ports: - "80:80" - links: - - app - volumes_from: - - app redis: image: redis:3.0 diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile deleted file mode 100644 index 5440e75..0000000 --- a/docker/nginx/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM nginx:1.11 - -COPY nginx.conf /etc/nginx/nginx.conf -COPY skinsystem.ely.by.conf /etc/nginx/conf.d/default.conf - -RUN mkdir -p /data/cache \ - /data/logs \ - && chown nginx:nginx -R /data diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf deleted file mode 100644 index dd75a2d..0000000 --- a/docker/nginx/nginx.conf +++ /dev/null @@ -1,31 +0,0 @@ -user nginx; -worker_processes auto; - -events { - worker_connections 4048; - multi_accept on; - use epoll; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 15; - types_hash_max_size 2048; - server_tokens off; - - access_log /data/logs/access.log combined buffer=32k; - error_log /data/logs/error.log crit; - - gzip off; - - client_max_body_size 1M; - - proxy_cache_path /data/cache levels=1:2 keys_zone=cache:30m max_size=1G; - - include /etc/nginx/conf.d/*.conf; -} diff --git a/docker/nginx/skinsystem.ely.by.conf b/docker/nginx/skinsystem.ely.by.conf deleted file mode 100644 index 829ceef..0000000 --- a/docker/nginx/skinsystem.ely.by.conf +++ /dev/null @@ -1,63 +0,0 @@ -server { - listen 80; - - charset utf-8; - set $root_path '/go/src/app'; - root $root_path; - - proxy_cache_use_stale error timeout invalid_header http_502; - proxy_cache_min_uses 1; - - location / { - proxy_pass http://app; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Real-IP $remote_addr; - - proxy_cache cache; - proxy_cache_valid 30m; - } - - location /minecraft.php { - if ($arg_name = "") { - return 400; - } - - if ($arg_type = "cloack") { - rewrite .* http://skins.minecraft.net/MinecraftCloaks/$arg_name.png? permanent; - break; - } - - if ($arg_type = "skin") { - rewrite .* /skins/$arg_name last; - break; - } - - return 404; - } - - location /cloaks/ { - try_files $uri $uri.png @cloaks; - } - - location @cloaks { - rewrite ^/cloaks/(.+?)(\.[^.]*$|$)$ http://skins.minecraft.net/MinecraftCloaks/$1.png? permanent; - } - - location ~* ^/skins/$ { - if ($arg_name = "") { - return 400; - } - - rewrite .* /skins/$arg_name last; - } - - location ~* ^/cloaks/$ { - if ($arg_name = "") { - return 400; - } - - rewrite .* /cloaks/$arg_name last; - } -}