• Generation du Certificate Request dans /etc/apache2/ssl/
  • openssl req $@ -new -days 365 -nodes -out cyteen.csr -keyout cyteen.key

  • Correction des permission dans /etc/apache2/ssl/
  • chown -R root:root /etc/apache2/ssl/
    chmod -R o-rwx /etc/apache2/ssl/

  • Activation de mod_ssl
  • a2enmod ssl

  • Configuration Strong Encryption dans /etc/apache2/mods-enabled/ssl.conf
  • SSLProtocol all
    SSLCipherSuite HIGH:MEDIUM

  • Fichier /etc/apache2/ports.conf
  • Listen 80
    Listen 443

  • VirtualHost Catch-ALL dans /etc/apache2/sites-enabled/000-default
  • NameVirtualHost *:80
    NameVirtualHost *:443
    <VirtualHost *:80>
    ServerAdmin webmaster@thenico.fr.eu.org
    DocumentRoot /var/www/
    ErrorLog /var/log/apache2/error.log
    LogLevel error
    CustomLog /var/log/apache2/access.log combined
    ServerSignature EMail
    SSLEngine off

    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>
    </VirtualHost>

    <VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/cyteen.crt
    SSLCertificateKeyFile /etc/apache2/ssl/cyteen.key
    ServerSignature EMail
    ErrorLog /var/log/apache2/error.log
    CustomLog /var/log/apache2/access.log combined
    LogLevel error
    ServerAdmin webmaster@thenico.fr.eu.org

    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>
    </VirtualHost>

  • VirtualHost Reverse Proxy dans /etc/apache2/sites-enabled/001-cyteen
  • <VirtualHost *:80>
    ServerName cyteen.thenico.fr.eu.org:80

    ProxyRequests off
    ProxyPass / http://192.168.0.4/
    ProxyPassReverse / http://192.168.0.4/
    ProxyVia Off

    LogLevel error
    ErrorLog /var/log/apache2/proxy-error.log
    CustomLog /var/log/apache2/proxy-access.log combined
    </VirtualHost>

    <VirtualHost *:443>
    ServerName cyteen.thenico.fr.eu.org:443

    ProxyRequests off
    ProxyPass / http://192.168.0.4/
    ProxyPassReverse / http://192.168.0.4/
    ProxyVia Off

    LogLevel error
    ErrorLog /var/log/apache2/proxy-error.log
    CustomLog /var/log/apache2/proxy-access.log combined
    </VirtualHost>