--- /dev/null
+#
+# Apaxy by @adamwhitcroft
+#
+# For a full breakdown of the mod_autoindex module
+# http://apache.org/docs/2.2/mod/mod_autoindex.html
+#
+
+# Don't index this folder
+Options -Indexes
--- /dev/null
+</div><!--/.wrapper-->
+
+<script type="text/javascript">
+// grab the 2nd child and add the parent class. tr:nth-child(2)
+document.getElementsByTagName('tr')[1].className = 'parent';
+// fix links when not adding a / at the end of the URI
+var uri = window.location.pathname.substr(1);
+if (uri.length > 0 && uri.substring(uri.length-1) != '/'){
+ var indexes = document.getElementsByClassName('indexcolname'),
+ i = indexes.length;
+ while (i--){
+ var a = indexes[i].getElementsByTagName('a')[0];
+ a.href = '/' + uri + '/' + a.getAttribute('href',2);
+ }
+}
+
+function getAjax(url, success) {
+ var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
+ xhr.open('GET', url);
+ xhr.onreadystatechange = function() {
+ if (xhr.readyState>3 && xhr.status==200)
+ success(xhr.responseText);
+ };
+ xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
+ xhr.send();
+ return xhr;
+}
+getAjax("title", function(data) {
+ document.getElementById('pagetitle').innerHTML = data;
+});
+</script>
--- /dev/null
+<div class="wrapper">
+ <h1 id="pagetitle"></h1>
+<!-- we open the `wrapper` element here, but close it in the `footer.html` file -->
--- /dev/null
+/*------------------------------------*\
+ Apaxy
+ by @adamwhitcroft
+
+ Theme name: Apaxy
+ Theme author: @adamwhitcroft
+\*------------------------------------*/
+@import url('//fonts.googleapis.com/css?family=Open+Sans');
+/* Have to use @import for the font, as you can only specify a single stylesheet */
+* {
+ margin:0;
+ padding:0;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ box-sizing: border-box;
+}
+
+html {
+ min-height:100%;
+ border-top:10px solid #ECEEF1;
+ border-bottom:10px solid #ECEEF1;
+ color:#61666c;
+ font-weight:400;
+ font-size:1em;
+ font-family:'Open Sans', sans-serif;
+ line-height:2em;
+}
+body {
+ padding:20px;
+ -webkit-backface-visibility:hidden;
+}
+code {
+ font-family:consolas,monospace;
+}
+a {
+ color:#61666c;
+ text-decoration:none;
+}
+a, img {
+ border:none;
+ outline:none
+}
+a:hover {
+ color:#2a2a2a;
+}
+/*------------------------------------*\
+ Wrapper
+\*------------------------------------*/
+.wrapper {
+ margin:0 auto;
+ padding-top:20px;
+ max-width:80%;
+}
+/*------------------------------------*\
+ Demo block
+\*------------------------------------*/
+.block {
+ font-size:.875em;
+ margin:20px 0;
+ padding:20px;
+ color:#9099A3;
+}
+/*------------------------------------*\
+ Table (directory listing)
+\*------------------------------------*/
+table {
+ width:100%;
+ border-collapse:collapse;
+ font-size:.875em;
+}
+tr {
+ outline:0;
+ border:0;
+}
+tr:hover td {
+ background:#f6f6f6;
+}
+th {
+ text-align:left;
+ font-size:.75em;
+ padding-right:20px;
+}
+/* 2nd Column: Filename */
+th + th {
+ width:65%;
+}
+/* 3rd Column: Last Modified */
+th + th + th {
+}
+/* 4th Column: Size */
+th + th + th + th {
+ width:5%;
+}
+tr td:first-of-type {
+ padding-left:10px;
+ padding-right:10px;
+}
+td {
+ padding:5px 0;
+ outline:0;
+ border:0;
+ border-bottom:1px solid #edf1f5;
+ vertical-align:middle;
+ text-align:left;
+ -webkit-transition:background 300ms ease;
+ -moz-transition:background 300ms ease;
+ -ms-transition:background 300ms ease;
+ -o-transition:background 300ms ease;
+ transition:background 300ms ease;
+}
+td a{
+ display: block;
+}
+tr.parent a[href^="/"] {
+ color:#9099A3;
+}
+ .parent a[href^="/"]:hover {
+ color:#2281d0;
+ }
+/*------------------------------------*\
+ Footer
+\*------------------------------------*/
+.footer {
+ text-align:center;
+ font-size:.75em;
+}
+
+h1#pagetitle {
+ text-align: center;
+}
+tr.parent a[href="/"]{
+ display: none;
+}
+
+tr.indexhead {
+ visibility: hidden;
+}
+
+th.indexcollastmod, td.indexcollastmod, th.indexcolsize, td.indexcolsize {
+ visibility: hidden;
+}
+
+.instructions a {
+ text-decoration: underline;
+}
+
+.instructions h2 {
+ margin-top: 10px;
+}
+.instructions em.important:before {
+ content: "⚠ Important ⚠ ";
+ color: red;
+}
+.instructions pre {
+ width: 50em;
+ padding: 10px 15px;
+ display: table;
+ border: 1px inset black;
+ line-height: 1em;
+}
./ftp/florian.nix
./ftp/denisejerome.nix
./ftp/immae.nix
+ ./ftp/release.nix
+ ./ftp/temp.nix
./tools/db
./tools/tools
./tools/dav
services.myWebsites.Emilia.production.enable = cfg.production.enable;
services.myWebsites.Capitaines.production.enable = cfg.production.enable;
services.myWebsites.Immae.production.enable = cfg.production.enable;
+ services.myWebsites.Release.production.enable = cfg.production.enable;
+ services.myWebsites.Temp.production.enable = cfg.production.enable;
services.myWebsites.Chloe.integration.enable = cfg.integration.enable;
services.myWebsites.Ludivine.integration.enable = cfg.integration.enable;
macros = {
modules = [ "macro" ];
};
+ stats = {
+ extraConfig = ''
+ <Macro Stats %{domain}>
+ Alias /awstats /var/lib/goaccess/%{domain}
+ <Directory /var/lib/goaccess/%{domain}>
+ DirectoryIndex index.html
+ AllowOverride None
+ Require all granted
+ </Directory>
+ <Location /awstats>
+ Use LDAPConnect
+ Require ldap-group cn=%{domain},ou=stats,cn=httpd,ou=services,dc=immae,dc=eu
+ </Location>
+ </Macro>
+ '';
+ };
ldap = {
modules = [ "ldap" "authnz_ldap" ];
extraConfig = ''
AuthBasicProvider ldap
</IfModule>
</Macro>
-
- <Macro Stats %{domain}>
- Alias /awstats /var/lib/goaccess/%{domain}
- <Directory /var/lib/goaccess/%{domain}>
- DirectoryIndex index.html
- AllowOverride None
- Require all granted
- </Directory>
- <Location /awstats>
- Use LDAPConnect
- Require ldap-group cn=%{domain},ou=stats,cn=httpd,ou=services,dc=immae,dc=eu
- </Location>
- </Macro>
-
+ '';
+ };
+ global = {
+ extraConfig = ''
ErrorDocument 500 /maintenance_immae.html
ErrorDocument 501 /maintenance_immae.html
ErrorDocument 502 /maintenance_immae.html
AliasMatch "(.*)/googleb6d69446ff4ca3e5.html" ${../../www}/googleb6d69446ff4ca3e5.html
'';
};
+ apaxy = {
+ extraConfig = ''
+ <Macro Apaxy %{folder} %{ignored}>
+ Alias /theme ${./apache/theme}
+ <Directory ${./apache/theme}>
+ Options -Indexes
+ AllowOverride None
+ Require all granted
+ </Directory>
+
+ # mod_autoindex
+ <Directory %{folder}>
+ Options Indexes
+ AllowOverride None
+ Require all granted
+
+ # Inspired from Apaxy by @adamwhitcroft
+
+ IndexOptions +Charset=UTF-8 +FancyIndexing +IgnoreCase +FoldersFirst +XHTML +HTMLTable +SuppressRules +SuppressDescription +NameWidth=* +IconsAreLinks +ShowForbidden
+
+ IndexHeadInsert "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />"
+
+ IndexIgnoreReset ON
+ IndexIgnore /theme .htaccess %{ignored}
+
+ AddIcon /theme/icons/blank.png ^^BLANKICON^^
+ AddIcon /theme/icons/folder.png ^^DIRECTORY^^
+ AddIcon /theme/icons/folder-home.png ..
+
+ AddIconByType (TXT,/theme/icons/text.png) text/*
+ AddIconByType (IMG,/theme/icons/image.png) image/*
+ AddIconByType (SND,/theme/icons/audio.png) audio/*
+ AddIconByType (VID,/theme/icons/video.png) video/*
+
+ AddIcon /theme/icons/archive.png .7z .bz2 .cab .gz .tar
+ AddIcon /theme/icons/audio.png .aac .aif .aifc .aiff .ape .au .flac .iff .m4a .mid .mp3 .mpa .ra .wav .wma .f4a .f4b .oga .ogg .xm .it .s3m .mod
+ AddIcon /theme/icons/bin.png .bin .hex
+ AddIcon /theme/icons/bmp.png .bmp
+ AddIcon /theme/icons/c.png .c
+ AddIcon /theme/icons/calc.png .xlsx .xlsm .xltx .xltm .xlam .xlr .xls .csv
+ AddIcon /theme/icons/cd.png .iso
+ AddIcon /theme/icons/cpp.png .cpp
+ AddIcon /theme/icons/css.png .css .sass .scss
+ AddIcon /theme/icons/deb.png .deb
+ AddIcon /theme/icons/doc.png .doc .docx .docm .dot .dotx .dotm .log .msg .odt .pages .rtf .tex .wpd .wps
+ AddIcon /theme/icons/draw.png .svg .svgz
+ AddIcon /theme/icons/eps.png .ai .eps
+ AddIcon /theme/icons/exe.png .exe
+ AddIcon /theme/icons/gif.png .gif
+ AddIcon /theme/icons/h.png .h
+ AddIcon /theme/icons/html.png .html .xhtml .shtml .htm .URL .url
+ AddIcon /theme/icons/ico.png .ico
+ AddIcon /theme/icons/java.png .jar
+ AddIcon /theme/icons/jpg.png .jpg .jpeg .jpe
+ AddIcon /theme/icons/js.png .js .json
+ AddIcon /theme/icons/markdown.png .md
+ AddIcon /theme/icons/package.png .pkg .dmg
+ AddIcon /theme/icons/pdf.png .pdf
+ AddIcon /theme/icons/php.png .php .phtml
+ AddIcon /theme/icons/playlist.png .m3u .m3u8 .pls .pls8
+ AddIcon /theme/icons/png.png .png
+ AddIcon /theme/icons/ps.png .ps
+ AddIcon /theme/icons/psd.png .psd
+ AddIcon /theme/icons/py.png .py
+ AddIcon /theme/icons/rar.png .rar
+ AddIcon /theme/icons/rb.png .rb
+ AddIcon /theme/icons/rpm.png .rpm
+ AddIcon /theme/icons/rss.png .rss
+ AddIcon /theme/icons/script.png .bat .cmd .sh
+ AddIcon /theme/icons/sql.png .sql
+ AddIcon /theme/icons/tiff.png .tiff .tif
+ AddIcon /theme/icons/text.png .txt .nfo
+ AddIcon /theme/icons/video.png .asf .asx .avi .flv .mkv .mov .mp4 .mpg .rm .srt .swf .vob .wmv .m4v .f4v .f4p .ogv
+ AddIcon /theme/icons/xml.png .xml
+ AddIcon /theme/icons/zip.png .zip
+ DefaultIcon /theme/icons/default.png
+
+ HeaderName /theme/header.html
+ ReadmeName /theme/footer.html
+ IndexStyleSheet /theme/style.css
+ </Directory>
+ </Macro>
+ '';
+ };
http2 = {
modules = [ "http2" ];
extraConfig = ''
--- /dev/null
+{ lib, pkgs, config, myconfig, mylibs, ... }:
+let
+ cfg = config.services.myWebsites.Release;
+ varDir = "/var/lib/ftp/release.immae.eu";
+ env = myconfig.env.websites.release;
+in {
+ options.services.myWebsites.Release = {
+ production = {
+ enable = lib.mkEnableOption "enable Release' website";
+ };
+ };
+
+ imports = [
+ ../commons/stats.nix
+ ];
+
+ config = lib.mkIf cfg.production.enable {
+ services.myWebsites.commons.stats.enable = true;
+ services.myWebsites.commons.stats.sites = [
+ {
+ name = "release.immae.eu";
+ conf = ./release_goaccess.conf;
+ }
+ ];
+
+ security.acme.certs."eldiron".extraDomains."release.immae.eu" = null;
+
+ services.myWebsites.production.vhostConfs.release = {
+ certName = "eldiron";
+ hosts = [ "release.immae.eu" ];
+ root = varDir;
+ extraConfig = [
+ ''
+ Use Stats release.immae.eu
+
+ Use Apaxy "${varDir}" "title .duplicity-ignore"
+ <Directory "${varDir}">
+ Use LDAPConnect
+ Options Indexes
+ AllowOverride All
+ Require all granted
+ </Directory>
+
+ <Directory "${varDir}/packages">
+ Use LDAPConnect
+ Options Indexes FollowSymlinks
+ AllowOverride None
+ Require all granted
+ </Directory>
+ ''
+ ];
+ };
+ };
+}
--- /dev/null
+time-format %H:%M:%S
+date-format %d/%b/%Y
+
+#sur immae.eu
+#log-format %v %h %^[%d:%t %^] "%r" %s %b "%R" "%u" $^
+
+log-format VCOMBINED
+#= %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
+
+html-prefs {"theme":"bright","layout":"vertical"}
+
+exclude-ip 188.165.209.148
+exclude-ip 178.33.252.96
+exclude-ip 2001:41d0:2:9c94::1
+exclude-ip 2001:41d0:2:9c94::
+exclude-ip 176.9.151.89
+exclude-ip 2a01:4f8:160:3445::
+exclude-ip 82.255.56.72
+
+no-query-string true
+
+keep-db-files true
+load-from-disk true
+db-path /var/lib/goaccess/release.immae.eu
+
+ignore-panel REFERRERS
+ignore-panel KEYPHRASES
+
+static-file .css
+static-file .js
+static-file .jpg
+static-file .png
+static-file .gif
+static-file .ico
+static-file .jpeg
+static-file .pdf
+static-file .csv
+static-file .mpeg
+static-file .mpg
+static-file .swf
+static-file .woff
+static-file .woff2
+static-file .xls
+static-file .xlsx
+static-file .doc
+static-file .docx
+static-file .ppt
+static-file .pptx
+static-file .txt
+static-file .zip
+static-file .ogg
+static-file .mp3
+static-file .mp4
+static-file .exe
+static-file .iso
+static-file .gz
+static-file .rar
+static-file .svg
+static-file .bmp
+static-file .tar
+static-file .tgz
+static-file .tiff
+static-file .tif
+static-file .ttf
+static-file .flv
+#static-file .less
+#static-file .ac3
+#static-file .avi
+#static-file .bz2
+#static-file .class
+#static-file .cue
+#static-file .dae
+#static-file .dat
+#static-file .dts
+#static-file .ejs
+#static-file .eot
+#static-file .eps
+#static-file .img
+#static-file .jar
+#static-file .map
+#static-file .mid
+#static-file .midi
+#static-file .ogv
+#static-file .webm
+#static-file .mkv
+#static-file .odp
+#static-file .ods
+#static-file .odt
+#static-file .otf
+#static-file .pict
+#static-file .pls
+#static-file .ps
+#static-file .qt
+#static-file .rm
+#static-file .svgz
+#static-file .wav
+#static-file .webp
+
+
--- /dev/null
+{ lib, pkgs, config, myconfig, mylibs, ... }:
+let
+ cfg = config.services.myWebsites.Temp;
+ varDir = "/var/lib/ftp/temp.immae.eu";
+ env = myconfig.env.websites.temp;
+in {
+ options.services.myWebsites.Temp = {
+ production = {
+ enable = lib.mkEnableOption "enable Temp' website";
+ };
+ };
+
+ config = lib.mkIf cfg.production.enable {
+ security.acme.certs."eldiron".extraDomains."temp.immae.eu" = null;
+
+ services.myWebsites.production.modules = [ "headers" ];
+ services.myWebsites.production.vhostConfs.temp = {
+ certName = "eldiron";
+ hosts = [ "temp.immae.eu" ];
+ root = varDir;
+ extraConfig = [
+ ''
+ Use Apaxy "${varDir}" "title"
+ <FilesMatch ".+">
+ Header set Content-Disposition attachment
+ </FilesMatch>
+ <Directory "${varDir}">
+ Options -Indexes
+ AllowOverride None
+ Require all granted
+ </Directory>
+
+ <DirectoryMatch "${varDir}/(.+)">
+ Options Indexes
+ </DirectoryMatch>
+ ''
+ ];
+ };
+ };
+}
+