You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.5 KiB

resolver 8.8.8.8;
#set dns resolver
server {
listen 80;
server_name e621.fuwwy.ch; #change this to your server name
location / {
proxy_pass https://e621.net:443;
proxy_set_header Host e621.net;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ssl_server_name on; #i dont know why this is needed
proxy_ssl_verify off; #but it wont work without it
sub_filter 'e621.net' 'e621.fuwwy.ch'; #simple rewriter that usually works but not for e6
sub_filter_once off;
sub_filter_types *;
}
location /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
location /robots.txt {
return 200 "User-agent: *\nDisallow: /";
access_log off;
log_not_found off;
}
}
server {
listen 80;
server_name static1.e621.fuwwy.ch; #same here
location / {
proxy_pass https://static1.e621.net:443;
proxy_set_header Host static1.e621.net;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ssl_server_name on;
proxy_ssl_verify off;
sub_filter 'e621.net' 'e621.fuwwy.ch';
sub_filter_once off;
sub_filter_types *;
}
location /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
location /robots.txt {
return 200 "User-agent: *\nDisallow: /";
access_log off;
log_not_found off;
}
}