worker_processes 3; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; #keepalive_timeout 0; keepalive_timeout 65; gzip on; server { listen 80; server_name localhost; location / { root /usr/local/www/nginx; index index.php index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/local/www/nginx-dist; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx$fastcgi_script_name; include fastcgi_params; } } #start deretan vhost server { listen 80; server_name sandbox.digitalfusi.com; location / { index index.html; root /usr/local/www/nginx/sandbox; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx/sandbox$fastcgi_script_name; include fastcgi_params; } } # vhost untuk dev nya server { listen 80; server_name dev.digitalfusi.com; location / { index index.html; root /home/dev; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/dev$fastcgi_script_name; include fastcgi_params; } } #eof deretan vhost # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} }