proxy_pass error: host not found in upstream

任晓磊 julyclyde at gmail.com
Mon May 10 13:08:34 MSD 2010


config file:
server {
        listen [::]:80;
        server_name svn.php.net;
        location /{
                proxy_pass http://svn.php.net;
        }
}
server {
        listen [::]:80;
        server_name upload.wikipedia.org;
        location /{
                proxy_pass http://upload.wikipedia.org;
        }
}

# /usr/sbin/nginx -t
[emerg]: host not found in upstream "upload.wikipedia.org" in
/etc/nginx/sites-enabled/blocked-reverse-proxy:12
configuration file /etc/nginx/nginx.conf test failed

I set the similar server block for reverse proxying svn.php.net and
upload.wikipedia.org , while svn.php.net passed the config test but
upload.wikipedia.org NOT. Why?

# /usr/sbin/nginx  -V
nginx version: nginx/0.7.64
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug
--with-http_stub_status_module --with-http_flv_module
--with-http_ssl_module --with-http_dav_module
--with-http_gzip_static_module --with-mail --with-mail_ssl_module
--with-ipv6 --add-module=/tmp/buildd/nginx-0.7.64/modules/nginx-upstream-fair

It's the debian package.

-- 
Ren Xiaolei



More information about the nginx mailing list