To create new wiki account, please join us on #znc at freenode and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

ZNC website has died on 29 March 2017, without fresh backups. Wiki is now back from dump of July 2015. Please help restoring the lost content.

Reverse Proxy

From ZNC
(Redirected from Reverse proxy)
Jump to: navigation, search

If you want to use a subdomain for the ZNC-Webinterface, you have to create a Reverse Proxy with your webserver.
Without setting TrustedProxy in your config you will only see or ::1 for each web-access in your logs => You can't block specific IP's
If you want to see the real IP's you have to add this to your config:

TrustedProxy =
TrustedProxy = ::1


server {
    listen 80;
    listen [::]:80;
    server_name znc.domain.tld;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://[::1]:6667/;


$HTTP["host"] =~ "^(sub\.domain\.com)$" {
  proxy.server = ( "" => ( ( "host" => "", "port" => 6667 ) ) )