mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 11:58:01 +08:00
添加nginx 配置实例
This commit is contained in:
parent
a1f744ea34
commit
27a21e33bd
@ -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))
|
||||
|
||||
### 编译安装
|
||||
|
||||
|
20
doc/jpom.conf
Normal file
20
doc/jpom.conf
Normal file
@ -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";
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user