mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-07-04 01:41:49 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d84cc73819 | |||
| b738f08c09 | |||
| 8252bba3ad | |||
| a776a5a5fe |
@@ -20,7 +20,11 @@ in
|
||||
phpPackage = mcfg.php.env;
|
||||
phpOptions = mcfg.php.options;
|
||||
|
||||
enablePerl = true;
|
||||
# NOTE: we include our own `mod_perl` in `extraModules` instead.
|
||||
enablePerl = false;
|
||||
|
||||
# NOTE: we include `mod_userdir` in `extraModules` and configure this in `extraConfig` ourselves.
|
||||
# enableUserDir = false;
|
||||
|
||||
# TODO: mod_log_journald in v2.5
|
||||
extraModules = [
|
||||
@@ -45,22 +49,9 @@ in
|
||||
|
||||
logPerVirtualHost = false;
|
||||
|
||||
extraConfig = ''
|
||||
extraConfig = lib.mkIf mcfg.debugMode ''
|
||||
TraceEnable on
|
||||
LogLevel warn rewrite:trace3
|
||||
|
||||
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
|
||||
SetHandler application/x-httpd-php
|
||||
</FilesMatch>
|
||||
<FilesMatch ".+\.phps$">
|
||||
SetHandler application/x-httpd-php-source
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
<FilesMatch "\.pl$">
|
||||
SetHandler modperl
|
||||
PerlResponseHandler ModPerl::Registry
|
||||
Options +ExecCGI
|
||||
</FilesMatch>
|
||||
'';
|
||||
|
||||
virtualHosts."temmie.pvv.ntnu.no" = {
|
||||
@@ -95,6 +86,9 @@ in
|
||||
"index.php"
|
||||
"index.php3"
|
||||
"index.php4"
|
||||
"index.php5"
|
||||
"index.php7"
|
||||
"index.php8"
|
||||
"index.pht"
|
||||
"index.phtml"
|
||||
|
||||
@@ -112,38 +106,66 @@ in
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<DirectoryMatch "^/home/pvv/.*/web-docs/(${lib.concatStringsSep "|" [
|
||||
"\\.git"
|
||||
"\\.hg"
|
||||
"\\.svn"
|
||||
"\\.ssh"
|
||||
"\\.env"
|
||||
"\\.env\\..*"
|
||||
"\\.envs"
|
||||
"\\.envs\\..*"
|
||||
"\\.envrc"
|
||||
"\\.bzr"
|
||||
"\\.venv"
|
||||
${lib.concatMapStringsSep "\n" (d: ''
|
||||
<Directory "${d}">
|
||||
Require all denied
|
||||
</Directory>
|
||||
'') [
|
||||
".git"
|
||||
".hg"
|
||||
".svn"
|
||||
".ssh"
|
||||
".bzr"
|
||||
".venv"
|
||||
"CVS"
|
||||
"RCS"
|
||||
|
||||
".*\\.swp"
|
||||
".*~"
|
||||
"*.bak"
|
||||
"*.bak*"
|
||||
"*.bkp"
|
||||
"*.bkp*"
|
||||
"*.backup"
|
||||
"*.backup*"
|
||||
]}
|
||||
|
||||
".*\\.bak"
|
||||
".*\\.bak.*"
|
||||
".*\\.bkp"
|
||||
".*\\.bkp.*"
|
||||
".*\\.backup"
|
||||
".*\\.backup.*"
|
||||
|
||||
".*\\.lck"
|
||||
".*\\.lock"
|
||||
"LCK\\.\\..*"
|
||||
]})(/|$)">
|
||||
AllowOverride All
|
||||
${lib.concatMapStringsSep "\n" (d: ''
|
||||
<Files "${d}">
|
||||
Require all denied
|
||||
</DirectoryMatch>
|
||||
</Files>
|
||||
'') [
|
||||
".env"
|
||||
".env.*"
|
||||
".envs"
|
||||
".envs.*"
|
||||
".envrc"
|
||||
|
||||
"*.swp"
|
||||
"*~"
|
||||
|
||||
"*.bak"
|
||||
"*.bak*"
|
||||
"*.bkp"
|
||||
"*.bkp*"
|
||||
"*.backup"
|
||||
"*.backup*"
|
||||
|
||||
"*.lck"
|
||||
"*.lock"
|
||||
"LCK..*"
|
||||
]}
|
||||
|
||||
<FilesMatch ".+\.ph(p[34578]?|t|tml)$">
|
||||
SetHandler application/x-httpd-php
|
||||
</FilesMatch>
|
||||
<FilesMatch ".+\.phps$">
|
||||
SetHandler application/x-httpd-php-source
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
<FilesMatch "\.pl$">
|
||||
SetHandler modperl
|
||||
PerlResponseHandler ModPerl::Registry
|
||||
Options +ExecCGI
|
||||
</FilesMatch>
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user