nginx proxy and wordpress multi user

WordPress multi user get a for serving blog experince to our student.

The architecture is :

Firewall -> FreeBSD Box -> Jail Box

A lot of jails (around 14) put inside FreeBSD Box to server student with different purpose. One of them is for wordpress muti user.

# jls

JID  IP Address      Hostname                      Path
14           /data2/jails/blogcom
13             /data2/jails/db
12           /data2/jails/demoint
11        /data2/jails/outside
10           /data/jails/mailserver
9        /data2/jails/sandbox
8           /data2/jails/blog
7          /data2/jails/demo2
6      /data/jails/palembang
5          /data/jails/jambi
4          /data/jails/lahat
3     /data/jails/prabumulih
2        /data/jails/linggau
1       /data/jails/baturaja

To establish connection to jail box I use this rules in nginx.conf :

For serving * for end user.

server {
listen 80;
location / {
proxy_set_header Host $host;

I use nginx :

# pkg_info | grep nginx
nginx-devel-0.7.41  Robust and small WWW server

Great, I love nginx 🙂

in Work | 196 Words

Make Virtual Host in Engine X (nginx)

Since last time I install php-fpm in my freebsd box I still looking way to make virtualhost. I think its not easy to make vhost in nginx but I’m wrong 🙂

Just add :

server {



will add new vhost.

Full sample from my vhost :

server {
        listen          80;

        location / {
            index index.php index.html;
            root  /usr/local/www/nginx/sandbox;
            location ~ \.php$ {
           fastcgi_index   index.php;
          fastcgi_param     SCRIPT_FILENAME
           include      fastcgi_params;


another feature that I learn too is ‘autoindex’ since my friend need to list all files and directory if no index files exists.

For more fancy index I need to recompile it with fancyindex but I’m OK with it 🙂

Full sample of nginx.conf for two vhost with autouindex on and off can be download from here.

in Unix | 144 Words

101 nginx tutorial and articles

I’m bit lazy to read manual and prefer to read it as a case. Nginx is my favourite now, by collecting related tutorial, blog posting and articles I hope I can learn nginx more.

Links I found so far :

  1. Reverse proxy in depth tutorial
  2. Step by step install Engine X (nginx) and php-fpm in FreeBSD
  3. Dreamier Dream Server with Nginx
  4. Setting Up nginx
  5. New Nginx.conf with optimizations
  6. NginxVirtualHostExample
  7. Nginx as a reverse proxy for Apache
  8. WordPress with Apache and NginX
  9. Moving to Nginx
  10. Nginx + PHP + PHP-FPM on Debian Etch 4.0
  11. WordPress + NGINX : plain permalinks without rewrite
  12. HOWTO: Install WordPress on Nginx
  13. NginX Reporting for Duty
  14. How to do your Nginx rewrites on a Multi User WordPress Integrated with BBPress
  15. Rewrite Non-SSL traffic to SSL Virtual Host with Nginx
  16. HOWTO: Configure nginx for Debian / Ubuntu
  17. Nginx Hacking Tips
  18. Tips on Configuring Nginx for Virtual Hosting
  19. Nginx and Memcached, a 400% boost!
  20. Install Nginx On Ubuntu Server 9.04

More links will be add.

Last Update : May 14 2009