Skip to content

Commit

Permalink
feat: /favicon.ico에 대한 파일 내려주기 추가 (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizyHub authored Aug 26, 2024
1 parent 8f04cc3 commit 062f29b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nginx/sites-available/default
Original file line number Diff line number Diff line change
Expand Up @@ -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로 리디렉션
}

Expand All @@ -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 / {
Expand All @@ -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 전용 액세스 로그 파일
Expand Down Expand Up @@ -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 / {
Expand All @@ -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 / {
Expand All @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions nginx/snippets/favicon.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
location /favicon.ico {
alias /var/www/favicon.ico;
access_log off; # 로깅 비활성화 (선택 사항)
log_not_found off; # 파일이 없을 때 에러 로그 비활성화 (선택 사항)
}

0 comments on commit 062f29b

Please sign in to comment.