Nagios with nginx over https

This is the nginx conf which worked for me for running Nagios3 with nginx over https, just putting it up here for needy folks like me.
Considering following upstreams for php5-fpm and fcgiwrap:

upstream php {
	server unix:/var/run/php5-fpm.sock;

upstream perl {
	server unix:/var/run/fcgiwrap.socket;

Assuming both php5-fpm and fcgiwrap for perl cgi are running, create a conf file as below:

server {
	listen	443; 
	ssl	on;

	ssl_certificate		/etc/nginx/ssl/;
	ssl_certificate_key	/etc/nginx/ssl/;


	access_log /var/log/nginx/foo.com_access.log;
	error_log  /var/log/nginx/foo.com_error.log;

	root /usr/share/nagios3/htdocs;	
	index index.php index.html;

	auth_basic "Ngios Auth";
	auth_basic_user_file /etc/nagios3/htpasswd.users;
	location /nagios3/stylesheets {
		alias /etc/nagios3/stylesheets;

	location /stylesheets {
		alias /etc/nagios3/stylesheets;

	location /nagios3/images {
		alias /usr/share/nagios3/htdocs/images;

	location ~ \.cgi$ {
		root /usr/lib/cgi-bin/nagios3;
		rewrite ^/cgi-bin/nagios3/(.*)$ /$1;
		include /etc/nginx/fastcgi_params;
		fastcgi_param AUTH_USER $remote_user;
		fastcgi_param REMOTE_USER $remote_user;
		fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/nagios3$fastcgi_script_name;	
		fastcgi_pass perl;

	location ~ \.php$ {
		try_files $uri = 404;
		include /etc/nginx/fastcgi_params;
		fastcgi_pass php;

Don’t forget to put “try_files $uri = 404;” while fastcgi passing php for security reasons.

Posted in Linux, open | Tagged , , | Leave a comment

Airtel 3G

Airtel has launched it’s 3G services in Bangalore, I enabled it, it’s the first time I am using any 3G service on my any phone. Airtel delivers more than 1 mbps in normal coverage conditions on my iPhone 3GS, here are the screenshots which I took from the two Speed test Apps that I have (Ookla and Cisco):

3G Test by Ookla
3G Test by Ookla
3G Test by Cisco
3G Test by Cisco
Posted in Bangalore, iPhone | Tagged , , , , | 3 Comments