I just upgraded to aegir 3.0. If I enable SSL on a site.com only, and if I hit https://example.com. I will be redirected to https://localhost.com (i.e. documentRoot /var/www/html, the default server host)

In order for https://example.com (with https) to work, I need to copy virtualhost config of site.com to /etc/httpd/conf.d/ssl.conf in Centos 6. That is not ideal, because the site virtualhost config is generated by aegir.

Is it a way to do it without copying virtualhost config to /etc/httpd/conf.d/ssl.conf?

Update

I did create a band new site (https://example.com) in Aegir. The virtual host configuraiton in /var/aegir/config/server_master/apache/vhost.d/example.com, contains a line like this <VirtualHost *:443>

If I change it to <VirtualHost 1.2.3.4:443> (i.e. the ip of the server), it works, but why?

  • Is it a Drupal or CentOS question? And what exactly you mean by "better"? – Mołot Aug 18 '15 at 13:36
  • I think it is mixed of Drupal and Centos. What I mean by 'better' is I should not manually copy virtualhost config to /etc/httpd/conf.d/ssl.conf. – kenpeter Aug 18 '15 at 13:47
  • @kenpeter Drupal's a PHP app, it wouldn't be able to help you to copy server config around. If you have a manual task that you want to automate, your best bet would be to write a script to do it, then invoke that script when you need to use it (e.g. a2enmod which you'll find in some flavours of linux, which enables an apache module, or a2ensite, etc). Drupal can't help you here though I'm afraid, this is a server config question – Clive Aug 18 '15 at 14:00
  • @Clive while I generally agree with your reasoning, your claim that "it wouldn't be able to help you to copy server config around" is pretty bold. I have seen situations where PHP apps did things like that. Probably this was bad. But it can be possible. Heck, Bootstrap module can edit .htaccess from inside of Drupal, that's already pretty close. – Mołot Aug 18 '15 at 14:19
  • I assume aegir 3.0 should be able to automate the task, without manually copy and paste virtualhost config, no? – kenpeter Aug 18 '15 at 14:22

If you don't have any apache config for the domain https://example.com then you land in the default vhost.

Add https://example.com as a site in Aegir and it will generate the config for you.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.