并且运行python网站程序
在服务器上下载nginx并且安装
打开nginx/conf/nginx.conf 配置文件
做一个代理
在
http { }
加入
server { listen 80;#端口 server_name yxqfx.cn;#域名或ip location / { proxy_pass http://127.0.0.1:5000;#你网站程序设置ip和地址 } }
如果要添加ssl
那就
server { listen 80; listen 443 ssl; server_name yxqfx.cn; ssl_certificate ssl/yxqfx.cn/fullchain.pem;#ssl的pem ssl_certificate_key ssl/yxqfx.cn/privkey.pem;#ssl的key ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; location / { proxy_pass http://127.0.0.1:5000; }
Comments NOTHING