安装nginx
sudo apt-get install nginx
安装gunicorn,supervisor
sudo pip install gunicorn supervisor
配置nginx
cd /etc/nginx/sites-available
sudo vim program_name
#编写配置文件
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:9000;
}
}
cd /etc/nginx/sites-enabled
sudo ln -s name
sudo service nginx reload
sudo service nginx restart
修改localhost
sudo vim /etc/hosts