Tag Archives: nginx

How to Work Around Nginx Install Issue on CentOS

Installing Niginx is very easy and straight forward with yum on CentOS. But I found it stopped to work last night. My installation script aborted with an error saying that it could not find libunwind package, which turns out no longer in the EPEL7 after a upgrade a couple of days ago.

Posted in Applications & Tools | Also tagged | 1 Response

Big Data to Tomcat Behind Nginx

In a Web application I created, I need to upload some data to a Java Servlet for further processing. I wish JavaScript could be more powerful so that I can process everything in the front end, but I could not find a good JavaScript library for the job.

Everything works well until some big changes got in – it stopped working sometimes and the pattern is not quite consistent. Initially I thought it was because of long time processing at the server side.

Posted in Applications & Tools | Also tagged , , | 2 Responses

Nginx: How to Fix Timeout Issues and More

If you’ve followed my blog, you’ve read several articles on Nginx. This is the last article of the series, and also an interesting one. While troubleshooting a system I helped to build, I found a very challenging problem that I think is worthwhile to share. The system consists of a client and a server, between which is a Nginx server as reversed proxy. This is a typical setting for flexibility and control. Somehow, the client got disconnected pretty consistently but the back end work went through successfully. It’s really a false alarm but not good for a product.

Posted in Applications & Tools | Also tagged , | 5 Responses

Nginx: How to Find out Real Source of HTTP Request

In a recent project using Nginx as reversed proxy server, I got into an interesting problem: how can the server behind the Nginx tell whether a HTTP request comes from remote host or local host? If I just look at the IP header of the request, they are all local because the reversed-proxied packets from remote seems to be sent from local as well. So I cannot really tell the source of a HTTP request.

Posted in Software Development | Also tagged , | 2 Responses

Authenticating Users in Nginx Using Both User Password and Client Certificates

In some use cases, you want to protect different parts of a Web application with different approaches. For example, the admin related resources normally require stronger mechanism than the user related ones. The following I will show how to use Nginx with client side certificate for the resources under /admin namespace for admins, and user/name for normal users.

Generating Certificates and Keys

Posted in Applications & Tools | Also tagged , | Leave a comment

Nginx with PAM Authentication

As I introduced in last article, Nginx is a lightweight Web and reversed proxy server that is gaining momentum. If you have URLs to be accessed only by authenticated users, you can have many options. In this article, I just introduce a very easy way for the Nginx to leverage the PAM (Pluggable Authentication Module) for user authentication. We will use OS user for authentication (there are many more methods supported by PAM). If you have a valid user with the Linux on which Nginx runs, your request will pass through; otherwise, it would be blocked.

Posted in Applications & Tools | Also tagged , , | 7 Responses

Configuring Nginx as Reversed Proxy Server for HTTPS

Nginx (pronounced as ‘engine x’) is a light-weight HTTP/reverse proxy/mail proxy server written by Igor Sysoe. It is flexible, lightweight compared, and high-performant with Apache. The official nginx site is here. The beginner guide is a very good starting point. The following is based on my hands-on experience with Nginx. If you have similar requirement, you can copy over the scripts and configuration for your environment.

Installing and running Nginx

Posted in Applications & Tools | Also tagged , | 2 Responses

    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.