Skip to research

Configuration de sous-domaines dans Drupal VM pour une installation multisite Drupal 8

Temps de lecture
Moins d'une minute

Ajouter pour chaque sous domaine les configurations servername, documentroot et extra_parameters au apache_vhosts du fichier de configuration conf.yml

# Apache VirtualHosts. Add one for each site you are running inside the VM. For
# multisite deployments, you can point multiple servernames at one documentroot.
# View the geerlingguy.apache Ansible Role README for more options.
apache_vhosts:
  - servername: "{{ drupal_domain }}"
    serveralias: "www.{{ drupal_domain }}"
    documentroot: "{{ drupal_core_path }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"
  
  # Implementation du sous domaine 'ORIGINAL'
  - servername: "original.{{ drupal_domain }}"
    documentroot: "{{ drupal_core_path }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"

  # Implementation du sous domaine 'REVUE'
  - servername: "revue.{{ drupal_domain }}"
    documentroot: "{{ drupal_core_path }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"
  
  # Implementation du sous domaine 'DOSSIERS'
  - servername: "dossiers.{{ drupal_domain }}"
    documentroot: "{{ drupal_core_path }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"

  - servername: "adminer.{{ vagrant_hostname }}"
    documentroot: "{{ adminer_install_dir }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"

  - servername: "xhprof.{{ vagrant_hostname }}"
    documentroot: "{{ php_xhprof_html_dir }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"

  - servername: "pimpmylog.{{ vagrant_hostname }}"
    documentroot: "{{ pimpmylog_install_dir }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"

  - servername: "{{ vagrant_ip }}"
    serveralias: "dashboard.{{ vagrant_hostname }}"
    documentroot: "{{ dashboard_install_dir }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"