nginx启动脚本

2019-10-29  本文已影响0人  MkTom
#   server 127.0.0.1:8001;  # 此处为uwsgi运行的ip地址和端口号
    # 如果有多台服务器,可以在此处继续添加服务器地址
#}

 #gzip  on;
#server {
#   listen  8000;
#   server_name 127.0.0.1;
#
#   location / {
#       include uwsgi_params;
#       uwsgi_pass uu;
#   }
#}

server {
    listen       8080 ssl;
    server_name  127.0.0.1;

    ssl on;
    ssl_certificate      /home/tom/1030/diversionSystem/服务器证书/234证书/server.crt;
    ssl_certificate_key  /home/tom/1030/diversionSystem/服务器证书/234证书/server.key;

    ssl_session_cache    shared:SSL:1m;
    ssl_session_timeout  5m;

    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers  on;




#   location /static {
#       alias   /home/tom/1030/diversionSystem/front_end_pc/static;
#       index  ../index.html;
#   }
    location /static {
        alias   /home/tom/1030/diversionSystem/front_end_pc/static;
#       index  ../index.html ../index.htm;
    }
    root /home/tom/1030/diversionSystem/front_end_pc;
    index  index.html index.htm;


    location / { 

        proxy_set_header Host $host;
        proxy_pass http://unix:/tmp/zixun.socket;
        
    }


#   location / { 
#
#       proxy_set_header Host $host;
#       proxy_pass http://unix:/tmp/zixun.socket;
#       }
}


server {
    listen       80;
    server_name  127.0.0.1;
    charset utf-8;


    location /media {
        alias   /home/tom/1030/diversionSystem/media;
#       alias   /home/tom/0326/diversionSystem/front_end_pc/static;
#       index  ../index.html;
    }
#   location / { 
#       proxy_set_header Host $host;
#       proxy_pass http://unix:/tmp/zixun.socket;
#   }


}



#server {
#    listen  2345;          # 监听端口
#    server_name    127.0.0.1; # 自己PC的ip或者服务器的域名
#    charset utf-8; # 避免中文乱码
#    root /home/tom/tableConversion/media;    # 文件路径
#    location / {
#        autoindex on; # 索引
#        autoindex_exact_size on; # 显示文件大小
#        autoindex_localtime on; # 显示文件时间
#    }
#}




上一篇 下一篇

猜你喜欢

热点阅读