From 99d4d8bfe9a23246817efafb175d4ea906b056af Mon Sep 17 00:00:00 2001 From: Yuri-Lima Date: Thu, 24 Aug 2023 17:16:13 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20REFACOT:=20ngix=20reseted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yaml | 2 +- nginx/nginx.conf | 202 ++++++++++++++++++++++---------------------- 2 files changed, 102 insertions(+), 102 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 7d3110e..7c898cb 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,7 +12,7 @@ services: - "/opt/containers/phx/app_custom:/usr/share/nginx/html/assets/custom" - "/opt/containers/phx/nginx/nginx.conf:/etc/nginx/nginx.conf" ports: - - "8081:80" + - "8083:80" # - "443:443" networks: - frontend diff --git a/nginx/nginx.conf b/nginx/nginx.conf index d5a9ab4..73a6f5d 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -1,126 +1,126 @@ -worker_processes 1; +# worker_processes 1; -events { - worker_connections 1024; -} +# events { +# worker_connections 1024; +# } -http { +# http { - sendfile on; - client_max_body_size 64m; - #client_body_temp_path /data/temp; +# sendfile on; +# client_max_body_size 64m; +# #client_body_temp_path /data/temp; - server { - listen 80; - server_name localhost; +# server { +# listen 80; +# server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; +# root /usr/share/nginx/html; +# index index.html index.htm; +# include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; +# gzip on; +# gzip_min_length 1000; +# gzip_proxied expired no-cache no-store private auth; +# gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - sendfile on; - client_max_body_size 64m; +# sendfile on; +# client_max_body_size 64m; - location / { - try_files $uri $uri/ /index.html; - } - # https://serverfault.com/questions/379675/nginx-reverse-proxy-url-rewrite - location /backend-api/ { - #rewrite ^/backend-api(.*) /$1 break; - proxy_pass http://phoenix-system:3000/; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - } +# location / { +# try_files $uri $uri/ /index.html; +# } +# # https://serverfault.com/questions/379675/nginx-reverse-proxy-url-rewrite +# location /backend-api/ { +# #rewrite ^/backend-api(.*) /$1 break; +# proxy_pass http://phoenix-system:3000/; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $http_host; +# } - location /admin-api { - proxy_pass http://phoenix-system:3000/admin-api; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - } +# location /admin-api { +# proxy_pass http://phoenix-system:3000/admin-api; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $http_host; +# } - location /remote-assets { - proxy_pass http://phoenix-system:3000/remote-assets; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - } +# location /remote-assets { +# proxy_pass http://phoenix-system:3000/remote-assets; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $http_host; +# } - location /sti { - proxy_pass http://phoenix-system:3000/sti; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - } +# location /sti { +# proxy_pass http://phoenix-system:3000/sti; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $http_host; +# } - location /ws { - proxy_pass http://phoenix-system:3000/graphql; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - } +# location /ws { +# proxy_pass http://phoenix-system:3000/graphql; +# proxy_http_version 1.1; +# proxy_set_header Upgrade $http_upgrade; +# proxy_set_header Connection "upgrade"; +# } +# } - server { # This new server will watch for traffic on 443 - listen 443 ssl http2; - server_name localhost; - ssl_certificate /etc/nginx/external-certificate/certificate.crt; - ssl_certificate_key /etc/nginx/external-certificate/certificate.key; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; +# server { # This new server will watch for traffic on 443 +# listen 443 ssl http2; +# server_name localhost; +# ssl_certificate /etc/nginx/external-certificate/certificate.crt; +# ssl_certificate_key /etc/nginx/external-certificate/certificate.key; +# root /usr/share/nginx/html; +# index index.html index.htm; +# include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; +# gzip on; +# gzip_min_length 1000; +# gzip_proxied expired no-cache no-store private auth; +# gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - sendfile on; - client_max_body_size 64m; +# sendfile on; +# client_max_body_size 64m; - location / { - try_files $uri $uri/ /index.html; - } +# location / { +# try_files $uri $uri/ /index.html; +# } - # https://serverfault.com/questions/379675/nginx-reverse-proxy-url-rewrite - location /backend-api/ { - #rewrite ^/backend-api(.*) /$1 break; - proxy_pass http://phoenix-system:3000/; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-Proto https; - } +# # https://serverfault.com/questions/379675/nginx-reverse-proxy-url-rewrite +# location /backend-api/ { +# #rewrite ^/backend-api(.*) /$1 break; +# proxy_pass http://phoenix-system:3000/; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $http_host; +# proxy_set_header X-Forwarded-Proto https; +# } - location /admin-api { - proxy_pass http://phoenix-system:3000/admin-api; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - } +# location /admin-api { +# proxy_pass http://phoenix-system:3000/admin-api; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $http_host; +# } - location /remote-assets { - proxy_pass http://phoenix-system:3000/remote-assets; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-Proto https; - } +# location /remote-assets { +# proxy_pass http://phoenix-system:3000/remote-assets; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $http_host; +# proxy_set_header X-Forwarded-Proto https; +# } - location /sti { - proxy_pass http://phoenix-system:3000/sti; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - } +# location /sti { +# proxy_pass http://phoenix-system:3000/sti; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host $http_host; +# } - location /ws { - proxy_pass http://phoenix-system:3000/graphql; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } +# location /ws { +# proxy_pass http://phoenix-system:3000/graphql; +# proxy_http_version 1.1; +# proxy_set_header Upgrade $http_upgrade; +# proxy_set_header Connection "upgrade"; +# } - } +# } -} \ No newline at end of file +# } \ No newline at end of file