worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
server_name api.fransic.com;
listen 5698 ssl;
ssl_certificate api.pem;
ssl_certificate_key api.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:3000;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
server_name api.fransic.com;
listen 5697 ssl;
ssl_certificate api.pem;
ssl_certificate_key api.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:3001;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
server_name api.fransic.com;
listen 5699 ssl;
ssl_certificate api.pem;
ssl_certificate_key api.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:3005;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
server_name api.fransic.com;
listen 5700 ssl;
ssl_certificate api.pem;
ssl_certificate_key api.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:3006;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
server_name api.fransic.com;
listen 5704 ssl;
ssl_certificate api.pem;
ssl_certificate_key api.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:3009;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Nginx启动
cd usr/local/nginx/sbin
./nginx
Nginx重载
cd /usr/local/nginx/sbin
./nginx -s reload
Nginx检测是否正确
cd /usr/local/nginx/sbin
./nginx -t
linux python后台运行
nohup python server.py > python.out 2>&1 &
查询后台python list
ps aux|grep python
python进程结束
kill -9 进程号