3
상대방이없는 경우 공유 위치 (절대 경로)에서 기본 robots.txt 파일을 제공하고 싶습니다. 것으로,nginx의 기본/공유 파일로 대체
location = /robots.txt {
expires 30d;
add_header Cache-Control public;
try_files /robots.txt @shared;
}
location @shared {
root /var/www/shared;
}
그래도 난 인정해야합니다
나는 운없이이 시도 :location = /robots.txt {
expires 30d;
add_header Cache-Control public;
try_files /robots.txt /var/www/shared/robots.txt =404;
}
그러나 그것은 단지 404