Sign in using Google or Yahoo! id.  

Nginx configuration for proxying (Ubuntu)

 Comments Share:   Twitter   Reddit   HackerNews   Facebook 

Assumptions

  • Tomcat or other app-server is running in port 8080 in the same system.
  • It is assumed that all requests are forwarded to Tomcat (see the location directive in the configuration below).
  • Your domain name is assumed to be domain.tld.

Nginx Configuration

server {
        listen   80;
        server_name  domain.tld;

        access_log  /var/log/nginx/domain_tld.access.log;

        location / {
                proxy_pass http://127.0.0.1:8080;
        }
}

Copy this file (Can name this file to anything. I name it domain_tld as a convention.) to /etc/nginx/sites-enabled/ folder. We need to remove the any default file in the sites-enabled directory.

Posted on March 22, 2010 09:23 AM by Subhash Chandran
nginx http linux proxying
blog comments powered by Disqus