第一个项目
This commit is contained in:
25
final_fix.sh
Normal file
25
final_fix.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
SERVER_IP="192.168.3.105"
|
||||
USER="xiaji"
|
||||
|
||||
ssh $USER@$SERVER_IP << 'EOF'
|
||||
# 修复权限问题
|
||||
sudo chown xiaji:www-data /home/xiaji/myproject/myproject.sock
|
||||
sudo chmod 660 /home/xiaji/myproject/myproject.sock
|
||||
|
||||
# 确认配置有效性
|
||||
sudo nginx -t && sudo systemctl reload nginx
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart family_rpa.service
|
||||
|
||||
# 验证服务状态
|
||||
echo -e "\n=== 最终服务状态 ==="
|
||||
sudo systemctl status family_rpa.service --no-pager | head -n 10
|
||||
sudo ss -nltp | grep -E ':80|.sock'
|
||||
|
||||
# 开放防火墙
|
||||
sudo ufw allow 80/tcp
|
||||
EOF
|
||||
|
||||
# 本地验证
|
||||
curl -v --connect-timeout 10 http://$SERVER_IP
|
||||
Reference in New Issue
Block a user