Nginx terbukti ampuh seperti kata teman saya , kali ini saya akan mencoba implementasi penggunaan nginx ini .... nih konfigurasinya
#######################################################################
#
# This is the main Nginx configuration file.
#
# More information about the configuration options is available on
# * the English wiki - http://wiki.codemongers.com/Main
# * the Russian documentation - http://sysoev.ru/nginx/
#
#######################################################################
#----------------------------------------------------------------------
# Main Module - directives that cover basic functionality
#
# http://wiki.codemongers.com/NginxMainModule
#
#----------------------------------------------------------------------
user nobody nobody;
worker_processes 2;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
#----------------------------------------------------------------------
# Events Module
#
# http://wiki.codemongers.com/NginxEventsModule
#
#----------------------------------------------------------------------
events {
worker_connections 1024;
}
#----------------------------------------------------------------------
# HTTP Core Module
#
# http://wiki.codemongers.com/NginxHttpCoreModule
#
#----------------------------------------------------------------------
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#tcp_noauth on ;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# The default server
#
server {
listen 82;
server_name boc.telkom.net.id ;
access_log /var/log/nginx/host.access.log main;
# Main location
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
# Static files location
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
root /spool/www/members_ng;
}
}
}
download modul rpaf
wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz
root@boc [~/mod_rpaf-0.6]# more README
mod_rpaf - reverse proxy add forward
This module does the opposite of mod_proxy_add_forward written
by Ask Bjørn Hansen. http://develooper.com/code/mpaf/
Compile and Install for 1.3:
apxs -i -a -c mod_rpaf.c
Compile and Install for 2.0:
apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c
or simply try:
make
Configuration Directives:
RPAFenable On
# Enable reverse proxy add forward
RPAFproxy_ips 127.0.0.1 10.0.0.1
# which ips are forwarding requests to us
RPAFsethostname On
# let rpaf update vhost settings
# allows to have the same hostnames as in the "real"
# configuration for the forwarding Apache
RPAFheader X-Forwarded-For
# Allows you to change which header mod_rpaf looks
# for when trying to find the ip the that is forwarding
# our requests
vi /usr/local/apache/conf.d/rpaf.conf
# Path to mod_rpaf-2.0.so, relative to /etc/httpd/
LoadModule rpaf_module modules/mod_rpaf-2.0.so
RPAFenable On
RPAFsethostname On
#Define our reverse proxy IP. Only substitute client IP in
#when we receive a request from this IP.
RPAFproxy_ips 127.0.0.1
# The header where the real client IP address is stored.
RPAFheader X-Forwarded-For
restart httpd , start nginx , jalan deh ................
- Biarkan Aku Melihat Cahaya ...
- Imajinasi jauh lebih penting dari pada pengetahuan. Imagination is more important than knowledge. ~ Albert Einstein
About Me
-
►
2010
(22)
- ► 06/13 - 06/20 (1)
-
▼
2009
(54)
- ► 10/25 - 11/01 (4)
- ► 08/02 - 08/09 (6)
- ► 07/26 - 08/02 (6)
- ▼ 07/19 - 07/26 (4)
- ► 05/17 - 05/24 (3)
- ► 04/12 - 04/19 (1)
- ► 03/01 - 03/08 (1)
- ► 02/22 - 03/01 (1)
- ► 02/15 - 02/22 (2)
- ► 02/08 - 02/15 (1)
- ► 02/01 - 02/08 (5)
- ► 01/25 - 02/01 (3)
- ► 01/18 - 01/25 (5)
- ► 01/11 - 01/18 (2)
- ► 01/04 - 01/11 (1)
-
►
2008
(88)
- ► 12/21 - 12/28 (1)
- ► 11/30 - 12/07 (4)
- ► 11/23 - 11/30 (2)
- ► 11/09 - 11/16 (5)
- ► 10/26 - 11/02 (1)
- ► 10/12 - 10/19 (2)
- ► 10/05 - 10/12 (1)
- ► 09/28 - 10/05 (4)
- ► 09/21 - 09/28 (4)
- ► 09/14 - 09/21 (1)
- ► 08/31 - 09/07 (1)
- ► 08/24 - 08/31 (1)
- ► 08/17 - 08/24 (4)
- ► 08/10 - 08/17 (5)
- ► 08/03 - 08/10 (9)
- ► 07/27 - 08/03 (1)
- ► 07/13 - 07/20 (2)
- ► 04/20 - 04/27 (1)
- ► 04/06 - 04/13 (1)
- ► 03/30 - 04/06 (1)
- ► 03/23 - 03/30 (1)
- ► 03/16 - 03/23 (2)
- ► 03/09 - 03/16 (5)
- ► 03/02 - 03/09 (6)
- ► 02/24 - 03/02 (4)
- ► 02/17 - 02/24 (2)
- ► 02/10 - 02/17 (13)
- ► 02/03 - 02/10 (2)
- ► 01/27 - 02/03 (2)
-
►
2007
(12)
- ► 10/07 - 10/14 (1)
- ► 08/26 - 09/02 (6)
- ► 04/15 - 04/22 (5)
-
►
2006
(3)
- ► 09/24 - 10/01 (2)
- ► 09/17 - 09/24 (1)
Blog Archive
Friend
Subscribe to:
Post Comments (Atom)





0 komentar:
Post a Comment
Post a Comment