いやもー、ぜんっぜん分かりませんからぁぁぁ(泣)
if とか見たくも無いのにorz マジ勘弁して(T-T)
/etc/nginx/conf.d/kusanagi_html_http.conf
location / {
try_files $uri $uri/ /index.php?$args;
}
if ($http_referer ~* (blog.goo.ne.jp|desktop2ch.net|2ch.net|ime.nu|l.moapi.net) ){
return 403;
break;
}
太字部分をこっそり追記でリファラーによるアクセス制限
自分じゃ動作確認出来てないんだけどネ………うまく動いてるといいなァ(遠い目
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
ログ取り。
/etc/nginx/nginx.conf に追記
geo $internal_access {
default off;
192.168.1.1 on;
127.0.0.1 on;
}
map $internal_access $mainlog {
off 1;
default 0;
}
map $internal_access $internallog {
off 0;
default 1;
}
/etc/nginx/conf.d/kusanagi_html_http.conf にも追記
access_log /home/kusanagi/kusanagi_html/log/nginx/blog-access.log main if=$mainlog;
access_log /home/kusanagi/kusanagi_html/log/nginx/home-access.log main if=$internallog;
error_log /home/kusanagi/kusanagi_html/log/nginx/error.log warn;
ーーーーーーーーーーーーーーーーーーーーーーーーーー
http ⇒ https へ強制転送
/etc/nginx/conf.d/kusanagi_html_http.conf に追記
server {
listen 80;
server_name new.lacus.to;
return 301 $host$request_uri;
1行追加するだけ。とっても楽ちんw












