               server {
                        listen 80;
                        listen 443 ssl;
                        server_name   baidu.com www.baidu.com;
                        access_log  logs/baidu.com.log  main;
                        ######如果不需要加证书访问下面这些可以注销######
                        ssl on;
                        ssl_certificate       /opt/nginx/conf/cert/ssl/baidu.com.pem;
                        ssl_certificate_key   /opt/nginx/conf/cert/ssl/baidu.com.key;
                        ssl_session_cache shared:SSL:1m;
                        ssl_session_timeout  10m;
                        ssl_prefer_server_ciphers on;
                        ssl_protocols SSLv3 SSLv2 TLSv1 TLSv1.1 TLSv1.2;
                        ######如果不需要加证书访问上面这些可以注销######

                        location / {
                                proxy_pass   http://127.0.0.1:3030;
                                proxy_set_header   Host             $host;
                        ### 5A 项目开发获取IP 变量不一样 $remote_addr 和 $proxy_add_x_forwarded_for 对调一下正常获取IP ###
                                proxy_set_header   X-Real-IP        $proxy_add_x_forwarded_for;
                                proxy_set_header   X-Forwarded-For  $remote_addr;
                        ### 5A 项目开发获取IP 变量不一样 $remote_addr 和 $proxy_add_x_forwarded_for 对调一下正常获取IP ###
                                proxy_http_version 1.1;
                                proxy_set_header Upgrade $http_upgrade;
                                proxy_set_header Connection "upgrade";
                         }
                }
