Tag Archives: proxy

Install Squid as HTTP and HTTPS Proxy Server

While creating the vSearch 3.0, we needed a HTTP/HTTPS proxy server to test the new features like public cloud support. With a little search, I found the Squid server. It turned out to be pretty easy to install a new one and use it based on default settings.

Like most of the software package on CentOS, Squid can be installed using the yum command line. Here is what’s needed to install and configure it.

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

Tomcat Behind Proxy: How to Block Direct Access

As discussed in my last post, after installing and configuring Nginx as the reversed proxy server for Tomcat, it’s necessary to block remote access to the original port served by Tomcat. To achieve this, iptables should be a good solution. Simpler solution is to change one line in the Tomcat server configuration file so that Tomcat accepts only requests from local host.

With Tomcat 7 on Ubuntu, the configuration file is /var/lib/tomcat7/conf/server.xml. Just add address=”″ into the related Connector section as follows:

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

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

Announcing Code Generator For vSphere Java API

As I tweeted last week, there would be a big announcement when the open source VI Java API gets 20,000 downloads. It hit target yesterday. To celebrate it, I decide to release the code generator for the API, which William (@lamw) rated as “awesome.”

Posted in vSphere API | Also tagged , | 12 Responses

How to Set Up Proxy With VI Java API?

It’s common for companies to proxy HTTP traffics to external Web site, but not so for internal sites. Therefore, you rarely need to set up proxy for using vSphere API calls with an internal vCenter server. The uncommon cases do come up sometimes. This post explains how to set it up for vSphere API. Note that this is not really for VI Java API only but applicable for all Java applications.

There are two options and you can pick either of them per your use case:

Posted in vSphere API | Also tagged | Leave a comment

    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.