Created
February 25, 2013 04:32
-
-
Save hatappo/5027760 to your computer and use it in GitHub Desktop.
画像ファイルだけ別のサブドメインでキャッシュ期間MAXでホストするnginxの設定サンプル。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name bar.foo.jp; | |
root /var/www/html; | |
deny all; | |
location ~ .*\.(jpe?g|JPE?G|gif|GIF|png|PNG|ico|ICO) { | |
log_not_found off; | |
access_log off; | |
allow all; | |
expires max; | |
} | |
location / { | |
return 404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment