docker-stacks/i2pd/nginx/i2pd.conf

25 lines
844 B
Plaintext
Raw Permalink Normal View History

server {
listen 80;
server_name i2p.domain.tld;
#charset utf-8;
location / {
#proxy_set_header Host $host;
# DO NOT USE THIS IF YOU DON'T KNOW WHAT YOU'RE DOING!
# Here we're replacing host by 'localhost' to avoid getting 'host mismatch' error and be able to proxy i2pd.
proxy_set_header Host 'localhost';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
proxy_pass http://127.0.0.1:7070/;
# We need to protect i2pd control panel
auth_basic "Restricted access";
auth_basic_user_file /path/to/.htpasswd;
}
}