This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
docpublic:systemes:shibboleth:idpv3xc8 [2020/06/04 14:38] procacci@tem-tsp.eu created |
docpublic:systemes:shibboleth:idpv3xc8 [2020/07/04 15:15] (current) procacci@tem-tsp.eu [proxy et TLS via apache] |
||
|---|---|---|---|
| Line 81: | Line 81: | ||
| </ | </ | ||
| + | ==== tomcat package tgz ==== | ||
| + | |||
| + | < | ||
| + | [root@idpx ~]# wget https:// | ||
| + | |||
| + | |||
| + | [root@idpx ~]# cd /opt | ||
| + | [root@idpx opt]# tar xvfz / | ||
| + | |||
| + | [root@idpx opt]# mv apache-tomcat-9.0.35/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | resultat | ||
| + | |||
| + | < | ||
| + | [root@idpx opt]# ls -al tomcat/ | ||
| + | total 164 | ||
| + | drwx------ 9 tomcat tomcat | ||
| + | drwxr-xr-x 5 root | ||
| + | -rw-r--r-- 1 tomcat tomcat | ||
| + | -rw-r--r-- 1 tomcat tomcat | ||
| + | -rw-r--r-- 1 tomcat tomcat | ||
| + | -rw-r----- 1 root | ||
| + | -rw-r----- 1 root | ||
| + | -rw-r----- 1 root | ||
| + | -rw-r----- 1 root | ||
| + | -rw-r----- 1 root | ||
| + | -rw-r----- 1 root | ||
| + | -rw-r----- 1 root | ||
| + | drwxr-x--- 2 root | ||
| + | drwx------ 2 root | ||
| + | drwxr-x--- 2 root | ||
| + | drwxr-x--- 2 root | ||
| + | drwxr-x--- 2 root | ||
| + | drwxr-x--- 7 root | ||
| + | drwxr-x--- 2 root | ||
| + | </ | ||
| + | |||
| + | positionnement des droits d' | ||
| + | |||
| + | < | ||
| + | [root@idpx opt]# chown -R tomcat: | ||
| + | </ | ||
| + | |||
| + | ==== parametrage tomcat ===== | ||
| + | |||
| + | acces manager | ||
| + | |||
| + | < | ||
| + | [root@idpx opt]# diff / | ||
| + | 20c20 | ||
| + | < allow=" | ||
| + | --- | ||
| + | > allow=" | ||
| + | </ | ||
| - | ==== parametrage compte admin tomcat ===== | ||
| compte admin d' | compte admin d' | ||
| < | < | ||
| - | [root@idp3 tomcat]# diff -ur tomcat-users.xml.orig | + | [root@idpx opt]# diff /opt/tomcat/conf/tomcat-users.xml |
| - | --- tomcat-users.xml.orig 2016-05-11 22: | + | 44,46d43 |
| - | +++ tomcat-users.xml 2016-05-11 22: | + | < <role rolename=" |
| - | @@ -34,13 +34,13 @@ | + | < |
| - | <user username=" | + | < |
| - | | + | |
| - | + | ||
| - | -<!-- <role rolename=" | + | |
| - | -<!-- <role rolename=" | + | |
| - | -<!-- <role rolename=" | + | |
| - | -<!-- <role rolename=" | + | |
| - | -< | + | |
| - | -<!-- <role rolename=" | + | |
| - | -<!-- <role rolename=" | + | |
| - | -<!-- <role rolename=" | + | |
| - | -<!-- <user name="admin" password=" | + | |
| - | +<role rolename=" | + | |
| - | +<role rolename=" | + | |
| - | +<role rolename=" | + | |
| - | +<role rolename=" | + | |
| - | +<role rolename=" | + | |
| - | +<role rolename=" | + | |
| - | +<role rolename=" | + | |
| - | +<role rolename=" | + | |
| - | +< | + | |
| - | </ | + | |
| </ | </ | ||
| - | ==== activation | + | |
| + | ==== activation | ||
| + | |||
| < | < | ||
| - | [root@idp3 tomcat]# systemctl enable | + | [root@idpx opt]# vim / |
| - | Created symlink from / | + | [root@idpx opt]# cat / |
| + | [Unit] | ||
| + | Description=Tomcat 9 | ||
| + | After=network.target | ||
| + | |||
| + | [Service] | ||
| + | Type=forking | ||
| + | |||
| + | User=tomcat | ||
| + | Group=tomcat | ||
| + | |||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | |||
| + | ExecStart=/opt/tomcat/bin/startup.sh | ||
| + | ExecStop=/ | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| - | [root@idp3 tomcat]# systemctl start tomcat.service | ||
| </ | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== start ==== | ||
| + | |||
| + | < | ||
| + | [root@idpx ~]# systemctl daemon-reload | ||
| + | [root@idpx ~]# systemctl enable tomcat.service | ||
| + | [root@idpx ~]# systemctl start tomcat.service | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== firewall ===== | ||
| + | |||
| + | < | ||
| + | [root@idpx opt]# firewall-cmd --permanent --add-rich-rule 'rule family=" | ||
| + | success | ||
| + | [root@idpx opt]# firewall-cmd --reload | ||
| + | success | ||
| + | |||
| + | [root@idpx opt]# firewall-cmd --permanent --add-rich-rule 'rule family=" | ||
| + | success | ||
| + | [root@idpx opt]# firewall-cmd --permanent --add-rich-rule 'rule family=" | ||
| + | success | ||
| + | [root@idpx opt]# firewall-cmd --reload | ||
| + | success | ||
| + | |||
| + | </ | ||
| + | ou plus generalement | ||
| + | |||
| + | firewall-cmd --zone=public --permanent --add-port=8080/ | ||
| + | |||
| + | |||
| + | |||
| ==== acces tomcat ==== | ==== acces tomcat ==== | ||
| - | le serveur est maintenant | + | le serveur est maintenant |
| - | http://idp3.tem-tsp.eu: | + | http://idpx.tem-tsp.eu: |
| - | ==== proxy-ajp et TLS via apache ===== | + | sauf si l' |
| - | mise en place d'un proxy ajp pour une gestion de TLS et ports par defaut (80/443) par apache | + | < |
| + | [root@idpx ~]# vim / | ||
| + | |||
| + | <Context antiResourceLocking=" | ||
| + | <Valve className=" | ||
| + | | ||
| + | <Manager sessionAttributeValueClassNameFilter=" | ||
| + | </ | ||
| + | </ | ||
| + | ==== proxy et TLS via apache ===== | ||
| + | |||
| + | https:// | ||
| + | https:// | ||
| + | https:// | ||
| + | |||
| + | |||
| + | mise en place d'un proxy pour une gestion de TLS et ports par defaut (80/443) par apache | ||
| il faut installer le mod_ssl d' | il faut installer le mod_ssl d' | ||
| < | < | ||
| - | [root@idp34 tomcat]# yum install mod_ssl | + | [root@idpx opt]# yum install |
| - | Installé : | + | |
| - | | + | Total download size: 2.0 M |
| + | Is this ok [y/N]: y | ||
| + | |||
| </ | </ | ||
| Line 144: | Line 255: | ||
| < | < | ||
| - | [root@idp34 certs]#grep ^SSL / | + | [root@idpx certs]#grep ^SSL / |
| SSLCertificateFile / | SSLCertificateFile / | ||
| SSLCertificateKeyFile / | SSLCertificateKeyFile / | ||
| Line 153: | Line 264: | ||
| < | < | ||
| - | [root@idp3' | + | [root@idpx ~]# cat / |
| ProxyPass /idp/ ajp:// | ProxyPass /idp/ ajp:// | ||
| ProxyPass /manager/ ajp:// | ProxyPass /manager/ ajp:// | ||
| + | </ | ||
| + | |||
| + | et l' | ||
| + | |||
| + | < | ||
| + | [root@idpx opt]# vim / | ||
| + | <!-- Define an AJP 1.3 Connector on port 8009 --> | ||
| + | < | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | sans l' | ||
| + | |||
| + | lancement httpd et verification de la presence du module AJP | ||
| + | |||
| + | < | ||
| + | [root@idpx opt]# systemctl start httpd.service | ||
| + | [root@idpx opt]# httpd -M | grep ajp | ||
| + | |||
| + | | ||
| + | |||
| </ | </ | ||
| acces sans le port 8080 : | acces sans le port 8080 : | ||
| - | http://idp3.tem-tsp.eu/ | + | http://idpx.imtbstsp.eu/ |
| puis en https via le proxy-ajp sans precision du port 443 | puis en https via le proxy-ajp sans precision du port 443 | ||
| - | https://idp3.tem-tsp.eu/ | + | https://idpx.imtbstsp.eu/ |