Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/65 Co-authored-by: Greg Sarjeant <greg@subcultureofone.org> Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
37 lines
1002 B
Plaintext
37 lines
1002 B
Plaintext
# Basic Apache VirtualHost for tkr
|
|
# For use with included docker-compose.yml
|
|
|
|
# HTTP - redirect to HTTPS
|
|
<VirtualHost *:80>
|
|
ServerName localhost
|
|
DocumentRoot /var/www/tkr/public
|
|
|
|
# Main directory - route everything through index.php
|
|
<Directory "/var/www/tkr/public">
|
|
AllowOverride None
|
|
Require all granted
|
|
|
|
RewriteEngine On
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteRule ^(.*)$ index.php [L]
|
|
</Directory>
|
|
|
|
# Block access to sensitive directories
|
|
<Directory "/var/www/tkr/storage">
|
|
Require all denied
|
|
</Directory>
|
|
<Directory "/var/www/tkr/src">
|
|
Require all denied
|
|
</Directory>
|
|
<Directory "/var/www/tkr/config">
|
|
Require all denied
|
|
</Directory>
|
|
<Directory "/var/www/tkr/templates">
|
|
Require all denied
|
|
</Directory>
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/tkr_error.log
|
|
CustomLog ${APACHE_LOG_DIR}/tkr_access.log combined
|
|
</VirtualHost>
|