nginx 的基本设置
nginx 基本结构
... #全局块
events { #events块
...
}
http #http块
{
... #http全局块
server #server块
{
... #server全局块
location [PATTERN] #location块
{
...
}
location [PATTERN]
{
...
}
}
server
{
...
}
... #http全局块
}
而我在部署时,是直接用screen后台运行软件运行jar包,然后用nginx反代理8090号端口。从而实现上线的!
screen的安装及使用
# 安装screen
yum install -y screen
# 创建一个新的窗口
screen -S test
# 进入窗口后 执行文件
python test.py
# 退出当前窗口
ctrl+a+d (方法1:保留当前窗口)
screen -d (方法2:保留当前窗口)
exit (方法3:退出程序,并关闭窗口)
# 查看窗口
screen -ls
# 重新连接窗口
screen -r id或窗口名称
# 示例:
screen -r 344
screen -r test
nginx配置
listen 80;
listen [::]:80;
server_name TobyLeng;
client_max_body_size 1024m;
root /usr/share/nginx/html;
location / {
proxy_pass http://iloveworld.love:8090;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
标签:...,窗口,screen,代理,Nginx,html,location,http,Halo
From: https://www.cnblogs.com/iloveworld/p/17379173.html