Skip to content

Instantly share code, notes, and snippets.

@GeorgeGedox
GeorgeGedox / laravel.conf
Created February 5, 2020 15:30
Laravel Virtual Host example for Apache containing SSL support and HTTP to HTTPS redirect
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
RewriteEngine on
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>