Ceci est une ancienne révision du document !
Hébergement web
Mettre en place un nouvel hébergement
Prérequis
Cloner CS_CT/ansible_hadoly.git
Le nom de domaine à héberger doit être associé via un CNAME à loth.hadoly.fr
Création du playbook
Sur la base du modèle suivant:
---
- hosts: loth.hadoly.fr
vars:
adherent_login: CHANGEME
adherent_password: CHANGEME
apache_server_name: CHANGEME
certbot_domains:
- "{{ apache_server_name }}"
certbot_email: CHANGEME
certbot_test: true
certbot_docroot: /srv/tom/www/
certbot_services: [ apache2 ]
roles:
- hebergementweb
- tconstans.certbot
Statut
WIP
Notes rapides sur l"'hébergement d'un wordpress:
wp-config.php:
WP_HOME et WP_SITEURL doivent pointer sur le fqdn du site en http
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $list = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']); $_SERVER['REMOTE_ADDR'] = $list[0]; } define( 'WP_HOME', 'http://hadoly.fr' ) ; define( 'WP_SITEURL', 'http://hadoly.fr' ) ; if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';
config frontal nginx doit inclure la directive:
proxy_set_header X-Forwarded-Proto https;