Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Jenkins Pipeline
- vue.js
- error
- grafana
- 리눅스
- subnetmask
- grpc
- jpa
- jenkins github
- Linux
- REACT
- CI/CD
- IntelliJ
- JavaScript
- jenkins install
- Docker
- Spring Boot
- docker network
- jenkins maven
- gradle
- 리액트
- jenkins 설치
- jenkins github 연동
- MongoDB
- jenkins jdk
- spring
- Jenkins
- MySQL
- java
- nginx
Archives
- Today
- Total
뭐든 즐기면서 ;)
NginX SSL 설정한 nginx.conf 파일 내용 (샘플링 하기 위해 올려놓음) 본문
728x90
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
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;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
upstream tomcat {
ip_hash;
server 127.0.0.1:8080;
}
# http 80으로 접근 시 443으로 redirect하기 위한 코드
server {
listen 80;
server_name domain.com;
return 301 https://$host$request_uri;
}
server {
# listen 80 default_server;
# listen [::]:80 default_server;
server_name domain.com;
root /usr/share/nginx/html;
listen 443 ssl;
listen [::]:443 ssl;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
# ssl 적용
ssl_certificate /etc/pki/tls/certs/domain.com.crt;
ssl_certificate_key /etc/pki/tls/private/domain.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# React로 만들어진 application
location / {
root /home/nginx/landing/build;
index index.html;
try_files $uri $uri/ /index.html =404;
}
# /builder 컨텍스트로 접근 시 보여질 application
location /builder {
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_set_header X-NginX-Proxy true;
proxy_pass http://tomcat;
proxy_redirect off;
charset utf-8;
}
error_page 404 403 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}
728x90
'서버 > WEB' 카테고리의 다른 글
403 Forbidden (2) | 2024.04.12 |
---|
Comments