- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
主机要求:Centos系统,内存64MB及以上、80端口没有被占用
Yum update -y Yum remove httpd -y
rpm -Uvh http://www.landui.com/linux/epel/6/i386/epel-release-6-8.noarch.rpm EPEL repo下载地址:https://www.landui.com/wiki/EPEL
安装Nginx
yum install nginx -y
调整Nginx配置
cd /etc/nginx/conf.d mv default.conf default.conf.disabled
cd /etc/nginx/conf.d vi yourdomain.com
粘贴以下内容:
server { listen 80; server_name yourdomain.com; access_log off; error_log off; location / { proxy_pass http://需要反代的服务器IP/; 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; } }
然后保存。
iptables -I INPUT 5 -m state --state NEW -p tcp --dport 80 -j ACCEPT service iptables save service iptables restart
service nginx start
售前咨询
售后咨询
备案咨询
二维码
TOP