-1

i have a website on my localhost, so to test the secure connection i did generate ssl certificate offline for localhost only, the thing is i used exact the same method as i did on my laptop, but it is not work for the new pc that i just setup. But it works fine on my laptop.

what could be the problem.

i did go through this too, but it not solved my problem Setup HTTPS on wildcard subdomain on localhost

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
            ServerAdmin webmaster@muster.project
            ServerName muster.project
            ServerAlias *.muster.project

            DocumentRoot /var/www/project/muster/web

            <Directory "/var/www/project/muster/web">
                    AllowOverride All
                    Allow from all
            </Directory>

            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined

            SSLEngine on

            SSLCertificateFile      /etc/apache2/ssl/apache.crt
            SSLCertificateKeyFile /etc/apache2/ssl/apache.key
            <FilesMatch "\.(cgi|shtml|phtml|php)$">
                            SSLOptions +StdEnvVars
            </FilesMatch>
            <Directory /usr/lib/cgi-bin>
                            SSLOptions +StdEnvVars
            </Directory>

            BrowserMatch "MSIE [2-6]" \
                            nokeepalive ssl-unclean-shutdown \
                            downgrade-1.0 force-response-1.0
            # MSIE 7 and newer should be able to use keepalive
            BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

    </VirtualHost>

Interestingly, it is only work for the https://muster.project but not for https://anything.muster.project

Same method, same system both lubuntu,

i did change the ServerAlias to www.muster.project *.muster.project it is also not works

i changed the not works either. there are no error log either... the only things i get was rsa server certificate is a ca certificate (basicconstraints ca == true ) i don't think this is matter since the domain without subdomain works.

did i need to set the /etc/hosts file? even though i did! it is not work.

got some idea how to solve this? it is been few days already fixing it without success. Thanks for the helps!

Hier are the tutorial i followed thomas-leister[dot]de/allgemein/apache-webserver-ssl-verschlusselung-einrichten/

Community
  • 1
  • 1
user3392555
  • 43
  • 2
  • 7

2 Answers2

1

Wildcards certificates only works for one level :

If you have a certificate for *.project it's valid for anything.project but not for anything.muster.project

Tom
  • 4,666
  • 2
  • 29
  • 48
  • it is not entirely true, i have the same on my laptop and it works, i guess it is not the problem.... – user3392555 Sep 02 '15 at 06:50
  • http://serverfault.com/questions/104160/wildcard-ssl-certificate-for-second-level-subdomain – Tom Sep 02 '15 at 08:03
  • i did read that thread, but since it works on my pc... also on my colleage pc... so i don't think that is the problem.. Note: my colleage using mac, and i do have one installed using windows and on my laptop using Ubuntu... on the new pc just wont work. btw, thanks for the response though... i did finish my works on my laptop... so for now i will leave it like that... – user3392555 Sep 18 '15 at 11:53
0

Finally i found the Problem... i set the wildcards DNS according to this sites

https://www.leaseweb.com/labs/2013/08/wildcard-dns-ubuntu-hosts-file-using-dnsmasq/

it seems it has nothing to do with the ssl (locally , it might be different for live website)..

i don't know why my laptop works even i don't set the dnsmasq... however it is works now. maybe it will help if someone face this problem.

user3392555
  • 43
  • 2
  • 7