# 聊天2 **Repository Path**: Is_peng/sqlite_front ## Basic Information - **Project Name**: 聊天2 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-28 - **Last Updated**: 2024-10-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # sqlite_front ## Project setup ``` yarn install ``` ### Compiles and hot-reloads for development ``` yarn serve ``` ### Compiles and minifies for production ``` yarn build ``` ### Lints and fixes files ``` yarn lint ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/). ### 部署 rm -rf /usr/share/nginx/html/* sudo cp -r /home/www/my_chat/dist/* /usr/share/nginx/html/ systemctl restart nginx [root@iZ2vc3lcmwvj8z52wjhs5uZ conf.d]# cat my_chat.conf server { listen 80; server_name 8.137.19.77; # 这里使用你的 IP 地址或域名 location /api { proxy_pass http://127.0.0.1:8901; # 代理到后端服务 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /socket.io { proxy_pass http://127.0.0.1:8902; # 代理到 WebSocket 服务 proxy_http_version 1.1; # 使用 HTTP/1.1 proxy_set_header Upgrade $http_upgrade; # 升级到 WebSocket proxy_set_header Connection "Upgrade"; # 升级连接 proxy_set_header Host $host; # 原始主机头 proxy_set_header X-Real-IP $remote_addr; # 客户端真实 IP proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 转发 IP proxy_set_header X-Forwarded-Proto $scheme; # 转发协议(HTTP/HTTPS) } location / { root /usr/share/nginx/html; # 指向 Nginx 网页根目录 index index.html index.htm; # 默认文件 try_files $uri $uri/ /index.html; # 处理前端路由 } # 其他的配置... }