diff --git a/i2pd/nginx/i2pd.conf b/i2pd/nginx/i2pd.conf new file mode 100644 index 0000000..7900af5 --- /dev/null +++ b/i2pd/nginx/i2pd.conf @@ -0,0 +1,25 @@ +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; + } +} \ No newline at end of file