Skip to content
On this page

BY NOW

Get your script now!

Apache Configuration

Make sure you have enabled mod_rewrite. There is an example config for running Alma script under apache:

bash
<VirtualHost example.com:80>
    DocumentRoot /var/www/alma/public
    ServerName example.com

    <Directory "/var/www/alma/public">
        AllowOverride All
        allow from all
        Options +Indexes
        Require all granted
    </Directory>

    RewriteEngine on
    RewriteCond %{SERVER_NAME} =example.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Or, you can use the file .htaccess

bash
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !on
    RewriteCond %{SERVER_PORT} !^443$
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>