TheLinuxFr : OTRS 5 VirtualHost et SSL via Let’s Encrypt
mardi 28 mars 2017 à 22:15Je partage mon fichier pour mettre en place un hôte virtuel avec OTRS 5. J’ai mis un peu de temps à voir une configuration fonctionnelle, donc si ça peut aider. Vous trouverez uniquement le fichier pour mettre en place l’hôte virtuel. L’installation d’OTRS est relativement simple en suivant la documentation (installation via les sources dans mon cas). Pour le certificat SSL j’utilise acme.sh, mais certbot peut aussi être utilisé…
DocumentRoot /opt/otrs/ ServerName mon_domaine.fr Alias /.well-known/acme-challenge /var/www/html/.well-known/acme-challenge Options None AllowOverride None Order allow,deny Allow from all RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}DocumentRoot /opt/otrs/ ServerName mon_domaine.fr Alias /.well-known/acme-challenge /var/www/html/.well-known/acme-challenge # Limit the number of requests per child to avoid excessive memory usage MaxRequestsPerChild 4000Options None AllowOverride None ForceType text/plain RedirectMatch 404 "^(?!/\\.well-known/acme-challenge/[\\w-]{43}$)" Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/" ScriptAlias / "/opt/otrs/bin/cgi-bin/" SSLEngine on SSLProtocol All -SSLv2 -SSLv3 -TLSv1 SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA SSLCertificateFile /etc/ssl/private/mon_domaine.fr-cert.pem SSLCertificateKeyFile /etc/ssl/private/mon_domaine.fr-key.pem SSLCertificateChainFile /etc/ssl/private/mon_domaine.fr-fullchain.pem# Setup environment and preload modules Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl # Reload Perl modules when changed on disk PerlModule Apache2::Reload PerlInitHandler Apache2::Reload # mod_perl2 options for GenericInterface PerlOptions -ParseHeaders AllowOverride None Options +ExecCGI -Includes # ErrorDocument 403 /otrs/customer.pl ErrorDocument 403 /index.pl AddHandler perl-script .pl .cgi PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders PerlOptions +SetupEnv DirectoryIndex index.pl Order allow,deny Allow from all = 2.4> Require all granted Order allow,deny Allow from all AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json AllowOverride None Order allow,deny Allow from all = 2.4> Require all granted Order allow,deny Allow from all # Make sure CSS and JS files are read as UTF8 by the browsers. AddCharset UTF-8 .css AddCharset UTF-8 .js # Set explicit mime type for woff fonts since it is relatively new and apache may not know about it. AddType application/font-woff .woff AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json # Cache css-cache for 30 days # Cache css thirdparty for 4 hours, including icon fonts Header set Cache-Control "max-age=2592000 must-revalidate" # Cache js-cache for 30 days Header set Cache-Control "max-age=14400 must-revalidate" # Cache js thirdparty for 4 hours Header set Cache-Control "max-age=2592000 must-revalidate" Header set Cache-Control "max-age=14400 must-revalidate"
Configuration dans OTRS
Vous pouvez passer par l’interface WEB ou éditer le fichier
/opt/otrs/Kernel/Config.pm
et ajouter :
$Self->{ScriptAlias} = ''; $Self->{HttpType} = 'https';
Relancer Apache et le tour est joué
Cet article OTRS 5 VirtualHost et SSL via Let’s Encrypt est apparu en premier sur TiFredFr.
Original post of TheLinuxFr.Votez pour ce billet sur Planet Libre.
Articles similaires
- TheLinuxFr : Avahi et annonce de services (05/09/2010)
- TheLinuxFr : Utiliser TeamViewer sous Linux sans serveur graphique (29/01/2016)