Since the server refactoring, it seems the web_ports variable is not properly passed to backend tasks. This creates a apache.conf (generated when platforms are verified) without a proper NameVirtualHost directive with the associated ports. Without this directive, all sites redirect to the first virtual host defined (in my case, aegir.hahaha.com, but it could redirect to another as those are loaded in alphabetical order.

Comments

Anonymous’s picture

To test this, I just added a new port to my web server (81), and it reverified both platforms. I then checked the apache.conf and it has written the new entry. See below

  NameVirtualHost *:80
  <VirtualHost *:80>
    ServerName default
    Redirect 404 /
  </VirtualHost>
  
  NameVirtualHost *:81
  <VirtualHost *:81>
    ServerName default
    Redirect 404 /
  </VirtualHost>

This seems as expected to me, or am I testing the wrong thing?

adrian’s picture

It may no longer pass the web_ports to the backend , but it is defaulting correctly in the absence of them

adrian’s picture

Status: Active » Fixed

This is fixed in head :

Moya:~ adrian$ cat Projects/hosting/config/apache.conf 
# Aegir web server configuration file

  NameVirtualHost *:80
  <VirtualHost *:80>
    ServerName default
    Redirect 404 /
  </VirtualHost>
  
  NameVirtualHost *:81
  <VirtualHost *:81>
    ServerName default
    Redirect 404 /
  </VirtualHost>
 

Moya:~ adrian$ cat .drush/server_master.alias.drushrc.php 
<?php 
$aliases['server_master'] = array (
  'context_type' => 'server',
  'remote_host' => 'Moya.local',
  'aegir_root' => '/Users/adrian/Projects/hosting',
  'script_user' => 'adrian',
  'backup_path' => '/Users/adrian/Projects/hosting/backups',
  'config_path' => '/Users/adrian/Projects/hosting/config/server_master',
  'include_path' => '/Users/adrian/Projects/hosting/config/includes',
  'master_url' => 'http://aegir.dev/',
  'master_db' => 'mysqli://root:pass@Moya.local',
  'db_service_type' => 'mysql',
  'web_group' => 'staff',
  'web_disable_url' => 'http://aegir.dev//hosting/disabled',
  'web_maintenence_url' => 'http://aegir.dev//hosting/maintenance',
  'apache_site_conf_path' => '/Users/adrian/Projects/hosting/config/server_master/vhost.d',
  'apache_platform_conf_path' => '/Users/adrian/Projects/hosting/config/server_master/platform.d',
  'apache_conf_path' => '/Users/adrian/Projects/hosting/config/server_master/apache.d',
  'restart_cmd' => 'sudo /Applications/MAMP/bin/apache2/bin/apachectl graceful',
  'web_ports' => 
  array (
    0 => '80',
    1 => '81',
  ),
  'http_service_type' => 'apache',
);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.