现在的位置: 首页 > 综合 > 正文

ubuntu 中xampp开启ssl

2013年11月10日 ⁄ 综合 ⁄ 共 780字 ⁄ 字号 评论关闭

If you need to enable SSL on Xampp whilst stilling using vhosts, follow the next few steps. It assumes that you already have vhosts enabled.

Open xampp/apache/conf/extra/httpd-vhosts.conf
Around line 19 you should see “NameVirtualHost *:80″, below this line add “NameVirtualHost *:443″ (without quotes)

Then add a new vhost site just like a normal one but with *443 instead on *80 and the following lines:

  1. SSLEngine on  
  2. SSLCertificateFile conf/ssl.crt/server.crt  
  3. SSLCertificateKeyFile conf/ssl.key/server.key  

An example of this is:

  1. <virtualhost *:443="">  
  2.     DocumentRoot "C:/xampp/htdocs/myproject/public"  
  3.     ServerName mysite.local  
  4.     ServerAlias mysite.local  
  5.     SSLEngine on  
  6.     SSLCertificateFile conf/ssl.crt/server.crt  
  7.     SSLCertificateKeyFile conf/ssl.key/server.key  
  8. </virtualhost>  

Restart Xampp apache and everything should work fine.

【上篇】
【下篇】

抱歉!评论已关闭.