Enabling SSL with XAMPP

后端 未结 6 752
野的像风
野的像风 2020-11-27 09:56

I\'ve been following this guide as much as I could http://robsnotebook.com/xampp-ssl-encrypt-passwords .

However whenever I browse to a page starting with https the

6条回答
  •  失恋的感觉
    2020-11-27 10:12

    I finally got this to work on my own hosted xampp windows 10 server web site. I.e. padlocks came up as ssl. I am using xampp version from November 2020.

    1. Went to certbot.eff.org. Selected from their home page software [apache] and system [windows]. Then downloaded and installed certbot software found at the next page into my C drive.

    2. Then from command line [cmd in Windows Start and then before you open cmd right click to run cmd as admin] I enhtered the command from Certbot page above. I.e. navigated to system32-- C:\WINDOWS\system32> certbot certonly --standalone

    3. Then followed the prompts and enteredmy domain name. This created certs as cert1.pem and key1.pem in C:\Certbot yourwebsitedomain folder. the cmd windows tells you where these are.

    4. Then took these and changed their names from cert1.pem to my domainname or shorter+cert.pem and same for domainname or shorter+key.key. Copied these into C:\xampp\apache\ssl.crt and ssl.key folders respectively.

    5. Then for G:\xampp\apache\conf\extra\httpd-vhosts entered the following:

    
        DocumentRoot "G:/xampp/htdocs/yourwebsitedomainname.hopto.org/public/" ###NB My document root is public.  Yours may not be.  Or could have an index.php page before /public###
        ServerName yourwebsitedomainnamee.hopto.org 
        
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Require all granted
        
        ErrorLog "G:/xampp/apache/logs/error.log"
        CustomLog "G:/xampp/apache/logs/access.log" common
        SSLEngine on
    SSLCertificateFile "G:\xampp\apache\conf\ssl.crt\abscert.pem"
    SSLCertificateKeyFile "G:\xampp\apache\conf\ssl.key\abskey.pem"
      
         
    
    1. Then navigated to G:\xampp\apache\conf\extra\httpd-ssl.conf and did as was advised above. I missed this important step for days until I read this post. Thank you! I.e. entered
    
    DocumentRoot "G:/xampp/htdocs/yourwebsitedomainnamee.hopto.org/public/"
    ###NB My document root is public.  Yours may not be.  Or could have an index.php page before /public###
    SSLEngine on
    SSLCertificateFile "conf/ssl.crt/abscert.pem"
    SSLCertificateKeyFile "conf/ssl.key/abskey.pem"
    CustomLog "G:/xampp/apache/logs/ssl_request.log" \
              "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
      
    
    

    Note1. I used www.noip.com to register the domain name. Note2. Rather then try to get them to give me a ssl certificate, as I could not get it to work, the above worked instead. Note3 I use the noip DUC software to keep my personally hosted web site in sync with noip. Note4. Very important to stop and start xampp server after each change you make in xampp. If xampp fails for some reason instead of starting the xampp consol try the start xampp as this will give you problems you can bug fix. Copy these quickly and paste into note.txt.

提交回复
热议问题