https for subdomains

Discussion in 'ISPConfig 3 Priority Support' started by saco721, Jan 30, 2017.

  1. saco721

    saco721 Member

    Hi,
    I have multiserver setup on debian squeeze with ispconfig 3.0.5.4p8.
    I have a now expired wildcard ssl certificate that I installed in ISPConfig. Before I renew the certificate I have a question. I create the domain www.mydomain.com and everything works as expected, I go to https://www.mydomain.com and the site is there. But when I create another subdomain using the DNS wizard and add new site, for example, site2.mydomain.com, and I go to https://site2.mydomain.com, i'm directed to https://www.mydomain.com, rather than the default index.html page. But if I go to http://site2.mydomain.com, it shows the default index.html page as expected. I was wondering how I can get https://site2.mydomain.com to point to the default index.html page rather than https://www.mydomain.com, or prevent the https://site2domain.com from being created and just have http://site2.mydomain.com. The reason being that only www.mydomain.com needs to use ssl, all other subdomains dont need it. Any advice would be greatly appreciated.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    SSL is always active for all subdomains of a site in ispconfig. But the redirect that you see does not looklike a redirect from ispconfig, most likely your website, or a custom redirect rule in .htaccess or the apache directives field is doing it.
     
  3. saco721

    saco721 Member

    Thanks Till,
    As you said it was the apache directives field, thanks for your help:).
     
  4. saco721

    saco721 Member

    I am trying to add apache_directives using the remoting api :
    but when I run the script and look at the web domain, options tab, the apache directives field for the domain is empty. How do I populate this field?, thanks for your help!
     
  5. sjau

    sjau Local Meanie Moderator

    How do you try this to add with remote api? Any script?
     
  6. saco721

    saco721 Member

    Hi sjau,
    Here is the function I have for remoting api (sites_web_domain_add):
     

    Attached Files:

  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Generally it should be possible to use the apache_directives option. Does the function work wehn you don't use apache_directives ? If yes, does it work when you use e.g.:

    'apache_directives' => '#test',
     
  8. saco721

    saco721 Member

    Thanks Till,
    Is working now.
     

Share This Page