Skip to content

Commit

Permalink
Updated ngixn config
Browse files Browse the repository at this point in the history
  • Loading branch information
DerCed committed Feb 14, 2024
1 parent 204f85f commit 4147f06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM nginx:alpine

RUN rm /etc/nginx/conf.d/default.conf
COPY ./nginx/config.conf /etc/nginx/conf.d

COPY ./out /usr/share/nginx/html/
EXPOSE 80
37 changes: 9 additions & 28 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
worker_processes 1;

events {
worker_connections 1024;
}

http {
server {
listen 8080;
server_name _;

server {
listen 80;
location / {
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;

error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
internal;
}

location / {
try_files $uri $uri/index.html =404;
}
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}

0 comments on commit 4147f06

Please sign in to comment.