Ssl trong Symfony 2

1. Start server trong xampp

start xampp
sudo /opt/lampp/lampp startssl

stop xampp
sudo /opt/lampp/lampp stopssl

2. Trong Route symfony 2

….
prefix:   /admin
requirements:
_scheme:  https

3. 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>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s