微微CMS-Nginx配置


微微CMS使用Nginx作为反向代理进行转发,承载起多个应用网站的入口,也有效的保护了后端的网站应用程序。

安装Nginx并设置为自动启动

yum -y install nginx
systemctl enable nginx


配置文件在/etc/nginx/conf.d里面


server {
    listen 80;
    server_name test1.vvcms.cn;
    client_max_body_size 10M;
    charset utf-8;
    access_log  /var/log/nginx/test1.vvcms.cn/access.log;
    error_log  /var/log/nginx/test2.vvcms.cn/error.log;

    location / {
        proxy_pass http://127.0.0.1:8081;
        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    }

}