diff --git a/nginx/sites-available/default b/nginx/sites-available/default index baced6ab..54e4be3e 100644 --- a/nginx/sites-available/default +++ b/nginx/sites-available/default @@ -3,6 +3,8 @@ server { listen [::]:80; server_name www.logbat.info logbat.info api.logbat.info sdk.logbat.info view.logbat.info nginx.logbat.info; + include /etc/nginx/snippets/favicon.conf; + return 301 https://$host$request_uri; # HTTP 요청을 HTTPS로 리디렉션 } @@ -14,6 +16,8 @@ server { # managed by Certbot include /etc/nginx/snippets/managed-by-Certbot.conf; + include /etc/nginx/snippets/favicon.conf; + include /etc/nginx/snippets/private-ip.conf; location / { @@ -33,6 +37,8 @@ server { # managed by Certbot include /etc/nginx/snippets/managed-by-Certbot.conf; + include /etc/nginx/snippets/favicon.conf; + include /etc/nginx/snippets/private-ip.conf; access_log /var/log/nginx/api_access.log; # api.logbat.info 전용 액세스 로그 파일 @@ -80,6 +86,8 @@ server { # managed by Certbot include /etc/nginx/snippets/managed-by-Certbot.conf; + include /etc/nginx/snippets/favicon.conf; + root /var/www/sdk; # 정적 파일이 있는 경로로 설정하세요 location / { @@ -95,6 +103,8 @@ server { # managed by Certbot include /etc/nginx/snippets/managed-by-Certbot.conf; + include /etc/nginx/snippets/favicon.conf; + include /etc/nginx/snippets/private-ip.conf; location / { @@ -114,6 +124,8 @@ server { # managed by Certbot include /etc/nginx/snippets/managed-by-Certbot.conf; + include /etc/nginx/snippets/favicon.conf; + include /etc/nginx/snippets/auth-value.conf; set $auth_allowed 0; diff --git a/nginx/snippets/favicon.conf b/nginx/snippets/favicon.conf new file mode 100644 index 00000000..bedee8aa --- /dev/null +++ b/nginx/snippets/favicon.conf @@ -0,0 +1,5 @@ +location /favicon.ico { + alias /var/www/favicon.ico; + access_log off; # 로깅 비활성화 (선택 사항) + log_not_found off; # 파일이 없을 때 에러 로그 비활성화 (선택 사항) +} \ No newline at end of file