Nginx
By Bys on February 24, 2022
1. Nginx 설치
2. Nginx 사용법
2.1 Nginx 설정
/etc/nginx/conf.d/test.conf
server {
listen 443 ssl;
server_name test.example.com;
ssl_certificate /etc/nginx/ssl/cert.pem;
ssl_certificate_key /etc/nginx/ssl/key.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA";
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1.2;
error_log /var/log/nginx/error.log warn;
access_log /var/log/nginx/access.log main;
#add_header X-Frame-Options "SAMEORIGIN";
root /app/nginx/test;
location / {
autoindex off;
try_files $uri$args $uri$args/ /index.html;
}
location ^~ /docs {
try_files $uri $uri.html /docs/index.html=404;
alias /app/nginx/docs;
index index.html;
}
}
nginx
web
opensource
]