HTTPS on XAMPP 3.2.2 (ENABLING OPEN SSL, NOT SECURE CHROME)

Problems with the Windows version of XAMPP, questions, comments, and anything related.

HTTPS on XAMPP 3.2.2 (ENABLING OPEN SSL, NOT SECURE CHROME)

Postby raghava205 » 08. September 2017 21:03

Hello All,
I have been struggling with this issue for a week now. I tried almost everything on the internet but none seems to be working for me.
I am not much of a server guy but, following some tutorials i was able to set-up XAMPP v3.2.2 server on windows 2012 R2. MY website is " "https://dotxxxprod01/projects/"
Coming to my issue... It was ok for me to use HTTP until now, as chrome started showing "NOT SECURE" in bold near address bar my users started worrying about the sites.
I searched on the internet and found couple of steps to avoid this BACK IN 2011,2012 not sure it will work with new version but tried... i did the following
1) un-commented "extension=php_intl.dll", "extension=php_curl.dll", "extension=php_intl.dll" in PHP.INI file.
2) un-commented "LoadModule rewrite_module modules/mod_rewrite.so" in httpd.conf file.
3) Then i created certificate following --> Open a command window (Start->Run, type “cmd” and press “OK) -->cd c:\xampp\apache -->makecert
4) ON server - Imported that certificate into MMC.exe/certmgr.msc
5) copied the following into "c:\xampp\apache\conf\extra\httpd-xampp.conf"
<IfModule mod_rewrite.c>
RewriteEngine On

# Redirect /xampp folder to https
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} xampp
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]

# Redirect /phpMyAdmin folder to https
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} phpmyadmin
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]

# Redirect /security folder to https
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} security
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]

# Redirect /webalizer folder to https
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} webalizer
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
</IfModule>
6) changed "DocumentRoot "C:/xampp/htdocs" to my website folder like "C:/xampp/htdocs/projects"
7) added 127.0.0.1 localhost, 127.0.0.1 dotxxxprod01, 127.0.0.1 dotxxxxprod01.ste.d.us in "C:\Windows\System32\config\hosts" file
8 ) added following in httpd-vhosts.conf file
NameVirtualHost *:80
NameVirtualHost *:443

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

<VirtualHost *:80>
ServerName localhost
ServerAlias dotxxxxprod01
DocumentRoot "C:/xampp/htdocs/projects"
<Directory "C:/xampp/htdocs/projects" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin admins@final.local
CustomLog final_local_access.log combined
ErrorLog final_local_error.log
LogLevel debug
</VirtualHost>

<VirtualHost *:443>
ServerName localhost
ServerAlias dotxxxxxprod01
DocumentRoot C:/xampp/htdocs/projects
<Directory "C:/xampp/htdocs/projects" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
SSLEngine on
SSLCertificateFile conf/ssl.crt/server.crt
SSLCertificateKeyFile conf/ssl.key/server.key
ServerAdmin admins@final.local
CustomLog final_local_access_ssl.log combined
ErrorLog final_local_error_ssl.log
LogLevel debug
</VirtualHost>
9) restarted apache and Mysql

I AM NOT SURE WHETHER I HAVE TO DO BOTH CERTIFICATE AND VHOSTS. TRIED BOTH AND ALSO INDIVIDUALLY, NONE SEEMS TO BE WORKING FOR ME. still chrome on client and server says not secure and "your site is not private".
YOU HELP IS GREATLY APPRECIATED. I AM VERY MUCH IN NEED FOR YOUR HELP. Thank you in advance
raghava205
 
Posts: 3
Joined: 08. September 2017 20:13
XAMPP version: 3.2.2
Operating System: windows 2012 r2

Re: HTTPS on XAMPP 3.2.2 (ENABLING OPEN SSL, NOT SECURE CHRO

Postby faospark » 09. September 2017 16:29

it has something to do with the new requirements of chrome and other browser of having Version 3 type of certificates which contain subjAltName.
please refer to discussion below to see on how circumvented the new requirement browsers.
essentially we made use of the makecert.bat file shipped with xampp and an additional file called V3.ext. by default the generated ssl certificate on xamp upon install is version 1.
i really suggest you read my discussion here with the other members of the forum
Code: Select all
https://community.apachefriends.org/f/viewtopic.php?f=16&t=75613
User avatar
faospark
 
Posts: 15
Joined: 07. March 2017 11:40
XAMPP version: 7.1.1
Operating System: windows 11

Re: HTTPS on XAMPP 3.2.2 (ENABLING OPEN SSL, NOT SECURE CHRO

Postby raghava205 » 11. September 2017 16:52

Sure, i will thanks for quick response.
One quick question, do we have to setup both certificate and vhosts or either one should be fine???
raghava205
 
Posts: 3
Joined: 08. September 2017 20:13
XAMPP version: 3.2.2
Operating System: windows 2012 r2

Re: HTTPS on XAMPP 3.2.2 (ENABLING OPEN SSL, NOT SECURE CHRO

Postby faospark » 14. September 2017 12:44

raghava205 wrote:Sure, i will thanks for quick response.
One quick question, do we have to setup both certificate and vhosts or either one should be fine???

the makecert.bat edits the default certificate installed on xampp. the main advantage of v3 certificates is you can specify the vitual domains you want by configuring the v3 file. this way you no longer have to specify on you virtual configuration the ssl certificate you generated.
User avatar
faospark
 
Posts: 15
Joined: 07. March 2017 11:40
XAMPP version: 7.1.1
Operating System: windows 11

Re: HTTPS on XAMPP 3.2.2 (ENABLING OPEN SSL, NOT SECURE CHRO

Postby raghava205 » 18. September 2017 15:21

Thank you FAOSPARK for the response.
Now i get it!!
By the way my issue got resolved, the default certificate and the certificate i created using makecert.bat were treated as not secure by our browser.
I have requested our telcom group to create an organization's certificate for me they did and deploying the cert and key did the magic.
Thanks again for the help.
raghava205
 
Posts: 3
Joined: 08. September 2017 20:13
XAMPP version: 3.2.2
Operating System: windows 2012 r2


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 146 guests