Linux 积累

来源:互联网 发布:ubuntu docker 编辑:程序博客网 时间:2024/05/21 20:30

常用操作命令

linux 常用命令:

命令 说明 service xxxxx restart 重新启动指定xxxxx用户tomcat服务 sudo -H -u test bash -c /var/tomcat/test/bin/startup.sh 为了安全,以test用户启动tomcat

常用操作

更改linux下nginx服务

更改nginx配置文件/usr/local/nginx/conf/nginx.conf,添加一个server节点

server
{
listen 80 default_server;
server_name localhost;
index index.jsp index.html;
root /home/default;
location ~ .* {
proxy_pass http://127.0.0.1:9000;
proxy_set_header X-Real-IP $remote_addr;
}
}
proxy_pass http://127.0.0.1:9000这一行的端口必须与前面tomcat的端口一致

0 0