Showing posts with label nginx. Show all posts
Showing posts with label nginx. Show all posts

Friday, August 17, 2012

browser shortcut with nginx and DNS

OS: Ubuntu

DNS

/etc/hosts
127.0.0.1 foo

Nginx 

in sites-enabled/default

if ( $host = wiki ) {  
   rewrite ^ https://wiki.example.com;
}

Monday, December 5, 2011

nginx load balance


http {
 upstream mylb {
   server 127.0.0.1:9999;
   server 127.0.0.1:9998;
  }

  server {
   proxy_pass http://mylb
  }
}




Thursday, November 25, 2010

Customize the Nginx Server:Apache

  1. vi src/http/ngx_http_header_filter_module.c
  2. static char ngx_http_server_string[] = "Server: Apache" CRLF;
  3. static char ngx_http_server_full_string[] = "Server: Apache" CRLF;
  4. configure, make, make install.

Wednesday, December 2, 2009

To install Nginx from source

./configure --prefix=/u/pandev/opt/nginx --without-http_rewrite_module