Skip to content

Commit

Permalink
Update README.md for NGINX conf example
Browse files Browse the repository at this point in the history
  • Loading branch information
jgribonvald authored Dec 14, 2023
1 parent 3317c51 commit 1c607a6
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ embed deployed app on tomcat, like the tomcat-manager, psi-probe
- [Reverse proxy configuration](#reverse-proxy-configuration)
- [Apache](#apache)
- [HAproxy](#haproxy)
- [NGINX](#nginx)
- [Run and init](#run-and-init)
- [Upgrades](#upgrades)
- [General case](#general-case)
Expand Down Expand Up @@ -125,7 +126,7 @@ Following example of proxy http configurations on a frontal server
</VirtualHost>
```

### HAproxy
#### HAproxy

```
frontend https-in
Expand All @@ -151,6 +152,46 @@ backend bk_karuta
server karuta AN_IP:8080
```

#### NGINX

```
server {
server_name URL_KARUTA;
listen 443 ssl;
listen [::]:443 ssl;
...
# SSL stuff and other things
...
# etc...
#
#Proxy headers
proxy_set_header Host $http_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;
proxy_pass_header Content-type;
#
# Le proxy
#
location /karuta {
proxy_pass http://IP_VM:8080/karuta/;
}
location /karuta-backend {
proxy_pass http://IP_VM:8080/karuta-backend;
}
location /karuta-config {
proxy_pass http://IP_VM:8080/karuta-config;
}
... etc ...
}
```

### Run and init

`./gradlew tomcatStart`
Expand Down Expand Up @@ -182,4 +223,4 @@ git pull #(maybe git stash && git pull && git stash --apply)
- `mysql -h${sql.server.host} -u ${user} -p ${password} ${database} < etc/database/report-helper.sql`

- When migrating from kapc 1.3, apply also such change on database:
- make dump of database, apply `sed -e 's/^) ENGINE=MyISAM/) ENGINE=InnoDB/'` on file and import dump - warning fonctions (routines) should be dumped too, or you will need to import `etc/database/karuta-backend-func.sql`
- make dump of database, apply `sed -e 's/^) ENGINE=MyISAM/) ENGINE=InnoDB/'` on file and import dump - warning fonctions (routines) should be dumped too, or you will need to import `etc/database/karuta-backend-func.sql`

0 comments on commit 1c607a6

Please sign in to comment.