Category Archives: nginx

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; } Advertisements

Posted in nginx, urlrewrite | Leave a comment

nginx load balance

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

Posted in nginx | Leave a comment

Customize the Nginx Server:Apache

vi src/http/ngx_http_header_filter_module.c static char ngx_http_server_string[] = “Server: Apache” CRLF; static char ngx_http_server_full_string[] = “Server: Apache” CRLF; configure, make, make install.

Posted in nginx | Leave a comment

To install Nginx from source

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

Posted in nginx | Leave a comment