Improved README with Tomcat configuration.
This commit is contained in:
parent
516296a314
commit
633ceced4b
1 changed files with 82 additions and 3 deletions
85
README.md
85
README.md
|
@ -55,6 +55,7 @@ Read CONCEPT.md and ONTOLOGY.md files.
|
||||||
|
|
||||||
## INSTALL
|
## INSTALL
|
||||||
|
|
||||||
|
### Requirements
|
||||||
Install Java :
|
Install Java :
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -63,9 +64,87 @@ apt-get install openjdk-17-jre-headless
|
||||||
|
|
||||||
Download the last release: https://forge.devinsy.fr/statool/statoolinfosweb/releases
|
Download the last release: https://forge.devinsy.fr/statool/statoolinfosweb/releases
|
||||||
|
|
||||||
|
### Apache Web Server
|
||||||
|
|
||||||
TODO
|
Add a JK section:
|
||||||
|
```
|
||||||
|
# Configure du mod-jk.
|
||||||
|
JkUnMount /.well-known/statoolinfos/* ajp13_worker
|
||||||
|
JkUnMount /.well-known/acme-challenge/* ajp13_worker
|
||||||
|
JkMount /* ajp13_worker
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
Enable the JK module:
|
||||||
|
```
|
||||||
|
a2enmod jk
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tomcat Server
|
||||||
|
Create a dedicated directory:
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir /srv/infos.mydomain.eu/
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a log configuration file:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd /srv/infos.mydomain.eu/
|
||||||
|
wget https://forge.devinsy.fr/statool/statoolinfosweb/src/branch/main/webapp/WEB-INF/log4j2.properties
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit the `/srv/infos.mydomain.eu/log4j2.properties`:
|
||||||
|
|
||||||
|
```
|
||||||
|
appender.logfile.fileName = /var/log/tomcat10/statoolinfosweb.log
|
||||||
|
appender.logfile.filePattern = /var/log/tomcat10/statoolinfosweb-%i.log.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a directory dedicated to webapps:
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir /var/log/tomcat10# cd /var/lib/tomcat10/webapps/statoolinfoweb
|
||||||
|
cd /srv/infos.mydomain.eu/
|
||||||
|
ln -s /var/log/tomcat10# cd /var/lib/tomcat10/webapps/statoolinfoweb webapps
|
||||||
|
```
|
||||||
|
|
||||||
|
Put the StatoolInfosWeb WAR file in `/srv/infos.mydomain.eu/` and create a link into the webapps directory:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd /srv/infos.mydomain.eu/webapps/
|
||||||
|
ln -s /srv/infos.mydomain.eu/SIW.ar ROOT.war
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a context file:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd /etc/tomcat10/Catalina
|
||||||
|
mkdir infos.mydomain.eu
|
||||||
|
cd infos.mydomain.eu
|
||||||
|
wget https://forge.devinsy.fr/statool/statoolinfosweb/src/branch/main/webapp/META-INF/context.xml -o ROOT.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit it:
|
||||||
|
|
||||||
|
```
|
||||||
|
<Environment name="kiss4web.environment.name" value="PROD" type="java.lang.String" override="true"/>
|
||||||
|
<Environment name="kiss4web.website.url" value="https://infos.mydomain.eu/" type="java.lang.String" override="true"/>
|
||||||
|
<Environment name="kiss4web.log4j2.path" value="/srv/infos.mydomain.eu/log4j2.properties" type="java.lang.String" override="true"/>
|
||||||
|
<Environment name="statoosinfosweb.configuration.file" value="/srv/statoolinfos/conf/mydomain.eu.conf" type="java.lang.String" override="true"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
Add a dedicated `host` section in `/etc/tomcat10/server.xml`:
|
||||||
|
|
||||||
|
```
|
||||||
|
<Host name="infos.libre-service.eu" appBase="webapps/infoslibreserviceeu"
|
||||||
|
unpackWARs="true" autoDeploy="true">
|
||||||
|
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
||||||
|
prefix="infos.libre-service.eu-access_log" suffix=".txt"
|
||||||
|
pattern="%h %l %u %t "%r" %s %b" />
|
||||||
|
</Host>
|
||||||
|
```
|
||||||
|
|
||||||
|
### StatoolInfos
|
||||||
|
|
||||||
|
The `cache` directory must be readable by Tomcat.
|
||||||
|
|
||||||
TODO
|
|
Loading…
Reference in a new issue