29 lines
1.1 KiB
Django/Jinja
29 lines
1.1 KiB
Django/Jinja
<VirtualHost *:80>
|
|
ServerName perso.crans.org
|
|
DocumentRoot /var/www/perso/
|
|
|
|
# Quelques redirections
|
|
RewriteEngine On
|
|
RewriteRule ^/phpmyadmin/?(.*)$ /usr/share/phpmyadmin/$1 [last]
|
|
RewriteRule ^/icons/(.*)$ /usr/share/apache2/icons/$1 [last]
|
|
RewriteRule ^/$ https://wiki.crans.org/PagesPerso [last,redirect]
|
|
RewriteRule ^/~(.*)$ https://perso.crans.org/$1 [last,redirect]
|
|
|
|
# Si ça match un utilisateur, on sert sa page personnelle
|
|
RewriteRule ^/([^~/]+)/(.*)$ /home/$1/www/$2 [last]
|
|
RewriteRule ^/([^~/]+)$ /home/$1/www/ [last]
|
|
|
|
# Log à part
|
|
CustomLog /var/log/apache2/perso.log combined
|
|
ErrorLog /var/log/apache2/perso.error.log
|
|
|
|
# Override defaults in /etc/apache2/mods-enabled/userdir.conf
|
|
# to add Indexes control in .htaccess and README
|
|
<Directory /home/*/www>
|
|
AllowOverride FileInfo AuthConfig Limit Indexes Options=Indexes
|
|
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
|
|
Require method GET POST OPTIONS
|
|
ReadmeName /mentionslegales.html
|
|
</Directory>
|
|
</VirtualHost>
|