Skip to content

Commit

Permalink
Chore | #17 | @lcomment | nginx 설정 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
lcomment committed May 10, 2024
1 parent 762d6d0 commit 3959867
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
Empty file added infra/certbot/.gitkeep
Empty file.
24 changes: 24 additions & 0 deletions infra/nginx/conf.d/app-server.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
server {
listen 80;
server_name prod-app-api.lovebird-wooda.com;
return 301 https://prod-app-api.lovebird-wooda.com$request_uri;
}

server {
listen 443 ssl http2;
server_name prod-app-api.lovebird-wooda.com;

ssl_certificate /etc/letsencrypt/live/prod-app-api.lovebird-wooda.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/prod-app-api.lovebird-wooda.com/privkey.pem;

location / {
proxy_pass http://prod-app-api.lovebird-wooda.com:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
}
61 changes: 61 additions & 0 deletions infra/nginx/conf.d/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

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

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

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

##
# Gzip Settings
##

gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

0 comments on commit 3959867

Please sign in to comment.