Skip to content

Commit

Permalink
fix(nginx): correct configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Aug 30, 2021
1 parent bad07ed commit 91c88c1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ FROM nginx:1.21.1-alpine@sha256:bfe377bdeb9ff37a62b49e149ac12c67a18089699bb844ce

WORKDIR /usr/share/nginx/html

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

COPY --from=build /srv/app/dist/ ./

Expand Down
26 changes: 26 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
user nginx;
worker_processes auto;

error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

server_tokens off;

set_real_ip_from 10.0.0.0/8;
Expand Down

0 comments on commit 91c88c1

Please sign in to comment.