Apache2 trinket

Example content for /etc/apache2/sites-available/trinket.conf

<VirtualHost *:80>
    ServerAdmin mail@example.com
	ServerName trinket.lan
	DocumentRoot "/var/www/html/trinket/public"

	<Directory /var/www/html/trinket/public>
        DirectoryIndex index.php
		AllowOverride All
		Order allow,deny
		Allow from all
        <IfModule mod_authz_core.c>
        	Require all granted
        </IfModule>
		Options Indexes FollowSymLinks MultiViews
	</Directory>
	
    # possible values: debug, info, notice, warn, error, crit, alert, emerg
	LogLevel notice
	ErrorLog ${APACHE_LOG_DIR}/trinket-error.log
	CustomLog ${APACHE_LOG_DIR}/trinket-access.log combined
	
</VirtualHost>

…do not forget /etc/hosts 🙂

enable mod_rewrite

sudo a2enmod rewrite
sudo systemctl restart apache2