config for gmotech.net

This commit is contained in:
Gilles Mouchet 2024-12-12 20:03:16 +01:00
parent a14e9fccaa
commit 12949c7b04
2 changed files with 11 additions and 8 deletions

View File

@ -32,14 +32,14 @@ docker run --rm -v /home/docker/portainer/data:/data portainer/helper-reset-pass
### http-portainer.conf ### http-portainer.conf
``` ```
<VirtualHost *:80> <VirtualHost *:80>
ServerName portainer.gmolab.net ServerName portainer.gmotech.net
ServerAlias portainer ServerAlias portainer
CustomLog logs/portainer_access_log common CustomLog logs/portainer_access_log common
ErrorLog logs/portainer_error_log ErrorLog logs/portainer_error_log
# redirect to https # redirect to https
RewriteEngine on RewriteEngine on
RewriteCond %{SERVER_NAME} =portainer [OR] RewriteCond %{SERVER_NAME} =portainer [OR]
RewriteCond %{SERVER_NAME} =portainer.gmolab.net RewriteCond %{SERVER_NAME} =portainer.gmotech.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost> </VirtualHost>
``` ```
@ -50,7 +50,7 @@ docker run --rm -v /home/docker/portainer/data:/data portainer/helper-reset-pass
## ##
# General setup for the virtual host # General setup for the virtual host
<VirtualHost *:443> <VirtualHost *:443>
ServerName portainer.gmolab.net ServerName portainer.gmotech.net
ServerAlias portainer ServerAlias portainer
CustomLog logs/portainer_access_log common CustomLog logs/portainer_access_log common
ErrorLog logs/portainer_error_log ErrorLog logs/portainer_error_log
@ -67,9 +67,9 @@ RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:!aNULL
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds) # HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security "max-age=63072000" Header always set Strict-Transport-Security "max-age=63072000"
# certificats # certificats
SSLCertificateFile "/etc/httpd/auth/cert/gmolab.net.crt" SSLCertificateFile "/etc/httpd/auth/cert/gmotech.net.crt"
SSLCertificateKeyFile "/etc/httpd/auth/cert/gmolab.net.key" SSLCertificateKeyFile "/etc/httpd/auth/cert/gmotech.net.key"
SSLCertificateChainFile "/etc/httpd/auth/cert/gmolabCA.crt" SSLCertificateChainFile "/etc/httpd/auth/cert/gmotechCA.crt"
# proxy # proxy
SSLProxyEngine On SSLProxyEngine On
ProxyPreserveHost On ProxyPreserveHost On
@ -79,8 +79,10 @@ RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:!aNULL
</VirtualHost> </VirtualHost>
``` ```
## Access ## Access
https://portainer.gmolab.net https://portainer.gmotech.net
## Change Session lifetime
To TEST !! (one year)
## Sources ## Sources
https://omar2cloud.github.io/rasp/psswd/ https://omar2cloud.github.io/rasp/psswd/
https://docs.portainer.io/admin/settings/authentication https://docs.portainer.io/admin/settings/authentication

View File

@ -1,6 +1,7 @@
services: services:
portainer: portainer:
command: --sslcert /certs/gmolab.net.crt --sslkey /certs/gmolab.net.key #command: --sslcert /certs/gmolab.net.crt --sslkey /certs/gmolab.net.key
command: --sslcert /certs/gmotech.net.crt --sslkey /certs/gmotech.net.key
image: portainer/portainer-ee:latest image: portainer/portainer-ee:latest
container_name: portainer container_name: portainer
ports: ports: