Last active
August 29, 2015 14:15
-
-
Save vvasilev-/159068cd5ede0401a44c to your computer and use it in GitHub Desktop.
Revisions
-
vvasilev- revised this gist
Feb 13, 2015 . 1 changed file with 34 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,6 +21,14 @@ ``` ## Setup virtual host ``` <VirtualHost *:80> DocumentRoot "path-to-public-folder" ServerName yourapp.example.com ServerAlias *.yourapp.example.com </VirtualHost> ``` ``` <VirtualHost *:443> DocumentRoot "path-to-public-folder" @@ -31,4 +39,29 @@ </VirtualHost> ``` ---- .htaccess for Laravel 4+ ``` <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect to HTTPS... RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Redirect Trailing Slashes... RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule> ``` Open http://yourapp.example.com and you will be redirected to https://yourapp.example.com -
vvasilev- revised this gist
Feb 12, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ ## Requirements * installed Apache 2.2 with OpenSSL module bundled * installed OpenSSL - http://slproweb.com/products/Win32OpenSSL.html ## Self-signed certificate * start Windows Command Prompt as Administrator * go to C:\OpenSSL\bin(or the folder where you installed OpenSSL) * follow the steps from 1 to 4 - http://www.akadia.com/services/ssh_test_certificate.html * copy the server.key & server.crt to <Apache2.2>/conf/ssl * open the httpd.conf and add ``Listen 443`` -
vvasilev- revised this gist
Feb 12, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,8 @@ ## Self-signed certificate * start Windows Command Prompt as Administrator * go to C:\OpenSSL\bin * follow the steps from 1 to 4 - http://www.akadia.com/services/ssh_test_certificate.html * copy the server.key & server.crt to <Apache2.2>/conf/ssl * open the httpd.conf and add ``Listen 443`` -
vvasilev- revised this gist
Feb 12, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,23 +10,23 @@ * open the httpd.conf and add ``Listen 443`` * enable mod_ssl in httpd.conf * at end of httpd.conf add this ``` <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin SSLSessionCache none </IfModule> ``` ## Setup virtual host ``` <VirtualHost *:443> DocumentRoot "path-to-public-folder" ServerName yourapp.example.com SSLEngine On SSLCertificateFile conf/ssl/server.crt SSLCertificateKeyFile conf/ssl/server.key </VirtualHost> ``` Open https://yourapp.example.com -
vvasilev- revised this gist
Feb 12, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,23 +10,23 @@ * open the httpd.conf and add ``Listen 443`` * enable mod_ssl in httpd.conf * at end of httpd.conf add this `` <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin SSLSessionCache none </IfModule> `` ## Setup virtual host `` <VirtualHost *:443> DocumentRoot "path-to-public-folder" ServerName yourapp.example.com SSLEngine On SSLCertificateFile conf/ssl/server.crt SSLCertificateKeyFile conf/ssl/server.key </VirtualHost> `` Open https://yourapp.example.com -
vvasilev- created this gist
Feb 12, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ ## Requirements * installed Apache 2.2 with OpenSSL module bundled * installed OpenSSL generator - http://slproweb.com/products/Win32OpenSSL.html ## Self-signed certificate * follow the steps from 1 to 4 - http://www.akadia.com/services/ssh_test_certificate.html * copy the server.key & server.crt to <Apache2.2>/conf/ssl * open the httpd.conf and add ``Listen 443`` * enable mod_ssl in httpd.conf * at end of httpd.conf add this {{{ <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin SSLSessionCache none </IfModule> }} ## Setup virtual host {{{ <VirtualHost *:443> DocumentRoot "path-to-public-folder" ServerName yourapp.example.com SSLEngine On SSLCertificateFile conf/ssl/server.crt SSLCertificateKeyFile conf/ssl/server.key </VirtualHost> }}} Open https://yourapp.example.com