diff --git a/README.md b/README.md index a665e9a83..b3835e66f 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,11 @@ 2. 上传到服务解压到根目录 3. 修改运行参数配置信息 [run.sh](/bin/run.sh) 4. 修改默认账号信息 [data/user.json](/bin/data/user.json) -5. 执行如下命令(记得给命令文件添加权限奥) +5. 执行如下命令(记得给命令文件添加权限奥[*chmod /jpom/run.sh 777*]) ``` /jpom/run.sh start ``` -6. 配置端口访问域名或者指定端口访问 +6. 配置端口访问域名或者指定端口访问(如果是nginx推荐配置:[/doc/jpom.conf](/doc/jpom.conf)) ### 编译安装 diff --git a/doc/jpom.conf b/doc/jpom.conf new file mode 100644 index 000000000..919e0bfe3 --- /dev/null +++ b/doc/jpom.conf @@ -0,0 +1,20 @@ + +server { + #charset koi8-r; + access_log /var/log/nginx/jpom.log main; + listen 80; + server_name jpom.xxxxxx.com; + + location / { + proxy_pass http://127.0.0.1:2122/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + client_max_body_size 50000m; + client_body_buffer_size 128k; + # websocket 配置 + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } +} + diff --git a/src/main/java/cn/jiangzeyin/service/BaseService.java b/src/main/java/cn/jiangzeyin/service/BaseService.java index 0c5232ada..2ffa2abd5 100644 --- a/src/main/java/cn/jiangzeyin/service/BaseService.java +++ b/src/main/java/cn/jiangzeyin/service/BaseService.java @@ -67,7 +67,7 @@ public abstract class BaseService { * * @param filename 文件名 * @param json json数据 - * @throws IOException + * @throws Exception */ protected void saveJson(String filename, JSONObject json) throws Exception { String key = json.getString("id");