Page 1 of 1

XAMPP Https not working

PostPosted: 08. June 2015 04:26
by cj1094
I have XAMPP setup for https ssl access to my site I created. For some reason when I use https on a remote device, or have friends use https to test it, they cannot connect to the website for some reason. No encryption works just fine on remote devices.

Here is my vhosts file. Let me know if anything else is needed.

www.confines.xyz

Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
   ServerName localhost
   DocumentRoot "C:\xampp\htdocs"
</VirtualHost>

<VirtualHost *:80>
   DocumentRoot "C:\xampp\htdocs\phpbb"
   ServerName www.confines.xyz
   ServerAlias confines.xyz
   
    <Directory "C:\xampp\htdocs\phpbb">
        Options All
        AllowOverride All
        order allow,deny
        allow from all
    </Directory>
</VirtualHost>

NameVirtualHost *:443

<VirtualHost *:443>
    DocumentRoot "C:\xampp\htdocs\phpbb"
    ServerName www.confines.xyz
    ServerAlias confines.xyz
   
    SSLEngine On
    SSLCertificateFile "C:\xampp\apache\conf\ssl.crt\server.crt"
    SSLCertificateKeyFile "C:\xampp\apache\conf\ssl.key\server.key"
   
    <Directory "C:\xampp\htdocs\phpbb">
        Options All
        AllowOverride All
        order allow,deny
        allow from all
    </Directory>
</VirtualHost>

Re: XAMPP Https not working

PostPosted: 08. June 2015 11:45
by Nobbie
Did you create a valid certificate for http://www.confines.xyz? For public access you have to buy an official SSL Certificat at an official provider (RapidSSL etc.).

Re: XAMPP Https not working

PostPosted: 09. June 2015 09:41
by cj1094
I used makecert to create a certification and private key. I could access my website via my phone, to test using a remote device over 4g, but now all of a sudden I can't connect over https on my phone.

Re: XAMPP Https not working

PostPosted: 09. June 2015 13:18
by Nobbie
cj1094 wrote:but now all of a sudden I can't connect over https on my phone.


"All of a sudden" means, that https and smartphone already worked with this certifikate? And what exactly do you mean by "can't connect"? An invalid certificate will not block a connection, you will receive an appropriate message. So if you cannot connect (what happens? Timeout? Server not found?), there must be a different reason.

What tells the access log and what the error log of that virtualhost?

Re: XAMPP Https not working

PostPosted: 10. June 2015 02:06
by cj1094
I get this error message in my error.log

Code: Select all
[Tue Jun 09 21:02:44.735460 2015] [ssl:warn] [pid 10872:tid 376] AH01909: www.confines.xyz:443:0 server certificate does NOT include an ID which matches the server name


When I connect on my phone I get that the page is not available via timeout.

Can you go to my website without any problems at https://www.confines.xyz?

Re: XAMPP Https not working

PostPosted: 10. June 2015 03:04
by gsmith
I can get in, I am warned by firefox, and have to manually say OK.

The warning in the error log is because when you were asked for the "Common Name" while creating the certificate, you did not give it www.confines.xyz, it's empty.

Now your phone may have some security setting that just will not let you in without a trusted certificate. Or will but only if the common name in the certificate and the hostname in the URL match.

Re: XAMPP Https not working

PostPosted: 10. June 2015 07:03
by cj1094
I give up on this. I've been using a proxy instead to view the website remotely. You and a lot of other people have said my site works remotely over https. My phone is just being stupid. Thanks for the help.

Re: XAMPP Https not working

PostPosted: 10. June 2015 10:13
by Nobbie
cj1094 wrote:Can you go to my website without any problems at https://www.confines.xyz?


Yes. I get an Error 403 (but this is due to missing rights on your server, it is not a problem of https).