Outils pour utilisateurs

Outils du site


admin:services:v1.chapril.org

Ceci est une ancienne révision du document !


Service v1.chapril.org

Ce service est un site statique, archive en ligne de la première version de www.chapril.org.

Actuellement, le v1.chapril.org est installé sur la vm lamp.

Configuration

Configuration NGINX

La première version du site www.chapril.org était utilisée pour propagée la bannière affichée en haut des services Chapril. Cela passait par un ajout au niveau de NGinx. Il suffisait d'ajouter 2 include dans le fichier de configuration NGinx du site ciblé. Pour l'archivage, ces 2 include ont été ré-insérés dans la conf de v1.chapril.org :

server {
    listen 80;
    listen [::]:80;

    server_name v1.chapril.org; 

    access_log /var/log/nginx/v1.chapril.org/v1.chapril.org.access_log;
    error_log /var/log/nginx/v1.chapril.org/v1.chapril.org.error_log;

    include /etc/nginx/acme-challenge;
    include /etc/nginx/sexy-chapril;
    include /etc/nginx/force-ssl.conf;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name v1.chapril.org;

    access_log /var/log/nginx/v1.chapril.org/v1.chapril.org.access_log;
    error_log /var/log/nginx/v1.chapril.org/v1.chapril.org.error_log;

    ssl_certificate     /var/lib/dehydrated/certs/v1.chapril.org/fullchain.pem;
    ssl_certificate_key /var/lib/dehydrated/certs/v1.chapril.org/privkey.pem;

    include /etc/nginx/sexy-chapril;
    include /etc/nginx/acme-challenge;

    #include /etc/nginx/chapril-banner-location;
    location /Chapril-banner {
        root /var/www/chapril.org/;
    }

    location / {
        #include /etc/nginx/chapril-banner;
set $banner_head '        <link rel="stylesheet" type="text/css"  href="/Chapril-banner/chapril-banner.css" />';
set $banner_body '    <!-- CHAPRIL BANNER -->
    <header id="chapril-banner">
      <div id="chapril-banner-zone">
    <div id="chapril-banner-logo">
      <a href="https://v1.chapril.org/"><img src="/Chapril-banner/chapril-logo-small.png" alt="Logo Chapril" /></a>
    </div>
    <div id="chapril-banner-menu">
      <ul>
        <li><a href="https://v1.chapril.org/">Accueil Chapril</a></li>
        <li><a href="https://v1.chapril.org/services.html">Services libres</a></li>
        <li><a href="https://pouet.april.org/@aprilorg">Nous suivre</a></li>
        <li><a href="https://v1.chapril.org/cgu.html">CGU</a></li>
        <li><a href="https://v1.chapril.org/a-propos.html">Mentions légales</a></li>
        <li><a href="https://v1.chapril.org/contact.html">Nous contacter</a></li>
      </ul>
    </div>
    <div id="chapril-banner-aprillogo">
      <a href="https://www.april.org/"><img src="/Chapril-banner/april-logo-small.png" alt="Logo April" /></a>
    </div>
      </div>
    </header>';

subs_filter '</head>' '
$banner_head
</head>';
subs_filter '</body>' '
$banner_body
  </body>';

sub_filter_once on;


        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://lamp.cluster.chapril.org;
    }
}

Supervision

Ajout de sondes dans root@admin:/etc/icinga2/zones.d/master/clusterlamp.conf :

  vars.http_vhosts["v1.chaprilorg force-ssl"] = {
    http_vhost = "v1.chapril.org"
    http_uri = "/"
    http_ssl = false
    http_expect = "HTTP/1.1 301 Moved Permanently,Location: https://v1.chapril.org/"
  }

  vars.http_vhosts["v1.chaprilorg homepage"] = {
    http_vhost = "v1.chapril.org"
    http_uri = "/"
    http_ssl = true
    http_string = "<title>Cha ronronne !</title>"
  }
admin/services/v1.chapril.org.1569407047.txt.gz · Dernière modification: 2019/09/25 12:24 par cpm