:: nginx reverse proxy with apache

51 sec read

:: how to installing nginx on linux debian

# aptitude install nginx

:: configure nginx as reverse proxy
+ create reverse proxy setup file

# cd /etc/nginx/conf.d
# vi proxy.conf
#### reverse proxy setup for nginx
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_buffers 32 4k;

+ setup proxy_pass on vhost / nginx.conf

# vi blackonsole.com.conf
server {
   listen  80;
   server_name  blackonsole.com www.blackonsole.com;

   access_log  /var/log/nginx/blackonsole.com.access.log ;
   error_log	/var/log/nginx/blackonsole.com.error.log ;

   location / {
	proxy_pass	//10.100.100.80:8080/ ;
	include		/etc/nginx/conf.d/proxy.conf;
   }
}

:: testing and restarting nginx

# nginx -t
# /etc/init.d/nginx restart

:: installing apache and rpaf module

# aptitude install apache2 libapache2-mod-rpaf

:: configure apache to use nginx proxy
+ change port

# vi /etc/apache2/ports.conf
NameVirtualHost *:8080
Listen 8080

+ enable rpaf-module on apache

# vi /etc/apache2/sites-enabled/000-default

### add these line in VirtualHost configuration
   RPAFenable      On
   RPAFsethostname On
   RPAFproxy_ips   127.0.0.1 10.100.100.80 ### can use multiple IP address

:: starting apached

# /etc/init.d/apache2 start

:: checking open port for nginx and apache

# netstat -tlpn | grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      16548/nginx
tcp6       0      0 :::8080                 :::*                    LISTEN      17347/apache2
tcp6       0      0 :::80                   :::*                    LISTEN      16548/nginx

:: testing
open your host / domainame using web browser.

//blackonsole.com

:: links
+ google
+ ubuntu

How to fix problem with the editor ‘vi’

:: git error with vi error: There was a problem with the editor 'vi'   :: how to fix the problem 0. check path...
sysadmin.id
10 sec read

Apache :: MP4 Streaming

:: How to Enable mp4 Streaming in Apache + Installing mod h624 streaming wget //h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz tar -xzf apache_mod_h264_streaming-2.2.7.tar.gz cd mod_h264_streaming-2.2.7/ ./configure --with-apxs=`which apxs2` make...
sysadmin.id
18 sec read

Apache :: Flash / FLV Streaming

:: How to Configure Apache for FLV Streaming + Installing mod_flvx wget //people.apache.org/~pquerna/modules/mod_flvx.c which apxs /usr/bin/apxs /usr/bin/apxs -cia mod_flvx.c + setup mod_flvx in http.conf...
sysadmin.id
15 sec read