Last update at :2024-04-27,Edit by888u
Host requirements: 64MB memory, port 80 not occupied
1. Upgrade the system and uninstall Apache
Yum update -y Yum remove httpd -y2. Change the update source a. Use EPEL repob and update the source
rpm -Uvh http://mirror.ancl.hawaii.edu/linux/epel/6/i386/epel-release-6-8.noarch.rpm3. Install Nginx and set up a. Install Nginx
yum install nginx -yb. Adjust Nginx configuration
cd /etc/nginx/conf.d mv default.conf default.conf.disabled4. Create Nginx anti-generation configuration file (replace zzsba.com with your own domain name below)
cd /etc/nginx/conf.d vizzsba.comPaste the following:
server { listen 80; server_name zzsba.com; access_log off; error_log off; location/{ proxy_pass http://server IP that needs to be reversed/; 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; proxy_max_temp_file_size 0; 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; } }Then save.
5. Set up a firewall to allow access to port 80
iptables -I INPUT 5 -m state --state NEW -p tcp --dport 80 -j ACCEPT service iptables save service iptables restart6. Start Nginx
service nginx startvia: https://www.lowendtalk.com/discussion/31261/nginx-reverse-proxy-tutorial-centos-6
Recommended site search: free vps trial 7-day accelerator, web page registration, free server domain name quick registration, US multi-ip site group vps website domain name query, truly free server, query IP address, US host, godaddy domain name registration,
p>
发表评论