Skip to main content

Ssl trong Symfony 2

· One min read
Tien
  1. Start server trong xampp
start xampp sudo /opt/lampp/lampp startssl

stop xampp sudo /opt/lampp/lampp stopssl
  1. Trong Route symfony 2
....
prefix:   /admin
requirements: _
scheme:  https
  1. Trong Virtual host
<VirtualHost 127.0.0.1:443>
ServerAdmin admin@website.com
DocumentRoot "/home/me/website/web"
ServerName website.com
ErrorLog "/home/me/website/error_log"
CustomLog "/home/me/website/access_log" common
<Directory "/home/me/website/web">
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile "/opt/lampp/etc/ssl.crt/server.crt"
SSLCertificateKeyFile "/opt/lampp/etc/ssl.key/server.key"
</VirtualHost>