Skip to content

Commit

Permalink
Fix nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-battaglia committed Oct 19, 2023
1 parent 59c05c2 commit 826cb2c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 35 deletions.
3 changes: 2 additions & 1 deletion angular-frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM nginx:stable

COPY dist/angular-frontend /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN mkdir /etc/nginx/templates
COPY nginx.conf /etc/nginx/templates/default.conf.template

EXPOSE 80
57 changes: 23 additions & 34 deletions angular-frontend/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

# upstream websocket {
# server 192.168.100.10:8080;
# }

server {
listen 80;
sendfile on;
default_type application/octet-stream;
server {
listen 80;
sendfile on;
default_type application/octet-stream;

gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 256;
gzip_vary on;
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_comp_level 9;
gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 256;
gzip_vary on;
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_comp_level 9;

root /usr/share/nginx/html;
root /usr/share/nginx/html;

location / {
try_files $uri $uri/ /index.html =404;
}
location / {
try_files $uri $uri/ /index.html =404;
}

location ~ \/(connect|app|topic)\/ {
proxy_pass ${SPRING_BACKEND};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
location ~ \/(connect|app|topic)\/ {
proxy_pass ${SPRING_BACKEND};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
}
}

0 comments on commit 826cb2c

Please sign in to comment.