Update README.md

This commit is contained in:
Adrien Bourmault 2022-08-29 22:03:56 +00:00
parent 88a4c87368
commit 6da16e49f4
1 changed files with 77 additions and 0 deletions

View File

@ -345,4 +345,81 @@ On pense enfin à recharger la configuration d'ejabberd avec `sudo ejabberdctl r
sudo ejabberdctl register admin@chalec.org mot_de_passe
```
## Installation d'un serveur web pour rediriger vers la page du site www.chalec.org
On utilise le serveur `nginx` des dépôts Debian.
```
sudo apt install nginx
```
On crée le fichier de configuration approprié pour notre service (cf [documentation infrastructure](https://git.a-lec.org/a-lec/commissions/infrastructure/doc-infra/-/blob/master/Serveurs/routeur.md))
<details>
server
{
listen 80;
listen [::]:80;
server_name xmpp.chalec.org;
access_log /var/log/nginx/xmpp.chalec.org-access.log;
error_log /var/log/nginx/xmpp.chalec.org-error.log;
return 302 https://xmpp.chalec.org$request_uri;
}
server
{
listen 444 ssl proxy_protocol;
listen [::]:443 ssl;
set_real_ip_from 192.168.0.1;
real_ip_header proxy_protocol;
server_name xmpp.chalec.org;
root /var/www/html;
access_log /var/log/nginx/xmpp.chalec.org-access.log;
error_log /var/log/nginx/xmpp.chalec.org-error.log;
ssl_certificate /etc/letsencrypt/live/xmpp.chalec.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/xmpp.chalec.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
# Add index.php to the list if you are using PHP
index index.html index.htm index.php index.xhtml;
# StatoolInfos.
include /etc/nginx/statoolinfos.conf;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
return 302 https://www.chalec.org/services/xmpp.html;
}
ssi on;
ssi_last_modified on;
# pass PHP scripts to FastCGI server
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
# With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
</details>