Configure reverse proxy server with Nginx

  Let’s talk about how to use Nginx’s reverse proxy function to make a reverse proxy server. 1. Installation steps: “ “ (System requirements: Linux 2.6+ kernel, the Linux operating system in this article is RedHat AS4 as an example) 1. Obtain relevant source programs wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.gz wget http://sysoev.ru/nginx/nginx-0.8.36.tar.gz 2. Create related directories and users /usr/sbin/groupadd apache /usr/sbin/useradd -g apache apache /usr/sbin/usermod -s /sbin/nologin apache chage -I -1 -M 99999 apache mkdir -p /data/mp3 chmod +w /data/mp3 chown -R apache:apache /data/mp3   3. Install the pcre library required by Nginx tar zxvf pcre-8.01.tar.gz cd pcre-8.01/ ./configure make && make install cd ../ 4. Install Nginx tar zxvf nginx-0.8.36.tar.gz cd nginx-0.8.36/ ./configure –user=apache –group=apache –prefix=/usr/local/nginx –with-http_stub_status_module make && make install cd ../ 5. Create Nginx configuration file rm -f /usr/local/nginx/conf/nginx.conf vi /usr/local/nginx/conf/nginx.conf Enter the following: “ “ user apache apache; worker_processes 8; “ “ error_log /dev/null crit; pid logs/nginx.pid; “ “ events { use epoll; worker_connections 512000; } “ “ http { include 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_mp3.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 650; server { listen 80; server_name xxx.xxx.xxx; #Front-end domain name or IP…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索