Some company users need to set up a CDN server for their own websites. However, some specific configuration methods on the network can be configured basically, but they also contain some minor errors, such as syntax errors of configuration files. . Therefore, Xiaobian has reorganized the specific configuration method for setting up the CDN server for everyone. Let's take a look at the users who need it.
configuration:
1, WEB server
domain name: www.win8.net
IP: 61.188.87.100
2, Nginx reverse proxy server
IP: 192.168.190.128
Operating system: Centos
3, client
IP: 192.168. 190.1
Operating System: win7
C:\\Windows\\System32\\drivers\\etc\\hosts #Open with Notepad and add the following line at the end of the file
192.168.190.128 Www.win8.net
Configuration Steps--Nginx Reverse Proxy Server
1. Shut down SELinux
vi /etc/selinux/config#SELINUX=enforcing #Comment out #SELINUXTYPE=targeted #Comment SELENUX=disabled #增:wq #Save, close. Shutdown -r now #restart the system
2, the firewall opens port 80
vi /etc/sysconfig/iptables-A INPUT -m state --state NEW -m tcp -p tcp -- Dport 80 -j ACCEPT #Add content /etc/init.d/iptables restart # Restart the firewall to make the configuration effective
3, install the compiler
yum install wget make gcc gcc-c++ zlib- Devel openssl openssl-devel pcre-devel gd kernel keyutils patch perl
4, system conventions
Software source code package storage location: /usr/local/src source package compilation installation location: /usr /local/Software Name
5, Download Software
cd /usr/local/src #Enter the directory (1), download nginx (current stable version) wget http://nginx.org /download/nginx-1.8.0.tar.gz(2), download pcre (support nginx pseudo-static) wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35 .tar.gz #This command I did not get the file, upload it to the server after downloading locally (2), download ngx_cache_purge (clear the specified URL cache) wget http://labs.frickle.com/files/Ngx_cache_purge-2.3.tar.gz
6. Install pcre
cd /usr/local/srcmkdir /usr/local/pcre #Create the installation directory tar zxvf pcre-8.35.tar.gzcd pcre -8.35./configure --prefix=/usr/local/pcre #configure makemake install
7. Install Nginx
groupadd www #addwww groupuseradd -g www www -s /bin /false #Create nginx run account www and join the www group, do not allow www users to log in directly to the system cd /usr/local/srctar zxvf ngx_cache_purge-2.3.tar.gztar zxvf nginx-1.8.0.tar.gzcd nginx-1.8. 0./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-openssl=/usr/--with-pcre=/usr/local/src /pcre-8.35 --add-module=../ngx_cache_purge-2.3 #Note: --with-pcre=/usr/local/src/pcre-8.35 points to the path to the source package decompression, not the path to install. Otherwise, you will get the error make #compile make install #install /usr/local/nginx/sbin/nginx #start nginxchown www.www -R /usr/local/nginx/html #set directory owner chmod 700 -R /usr/local/Nginx/html #Set directory permissions Previous123Next page Total 3 pages
in Linux system The shell in the system is a programming language that can execute various commands
Perl is a programming language, as powerful as C, and easy to use. However, Perl co
In school, you usually use campus network, you need to use special software to connect to the networ
JNDI is a standardized Java naming system interface. In the Jetty container, JNDI can be compiled an
What should I do if the Shell command cannot be used after the Linux system is installed?
After the Linux boot, the terminal prompts -bash-2.05b$ What should I do?
CentOS 6.6 system installation steps
Ubuntu prompts missing fonts after installing WPS. What should I do?
Linux how to install and use NeoBundle
How to use ftp command under Linux
Linux system rescue mode operation example
How to change the position of the close/maximize/minimize button in the Ubuntu program window
What are the commands for monitoring the performance of Linux systems?
How to use the du and df commands to clear large files under Linux?
How does Ubuntu recover the GNOME Panel that was accidentally deleted?
Window7 hides the simple operation of the taskbar
Win10 system boot automatically pops up MSN Chinese network how to solve?
How does the Win8 system turn "crossing the fire line" into full screen?
How to change the HTML editor of IE "View Source" to Notepad, Word or Exce
Win10 preview version 10122 officially known issues Daquan
Microsoft Windows 8 latest UI has been leaked in the video
Win7 CD Image Recorder Usage Tutorial
Eight strokes to quickly reduce the shutdown time
Win7 system boot prompts LDrvPro64.sys can not verify the digital signature solution