diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2016-04-12 18:35:37 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2016-04-12 18:35:37 +0200 |
commit | 5b42f93b5b0d33dc5c790991431b6282a5671bc9 (patch) | |
tree | e5c1868c9450cc1c964dbc8693be5cfff1dc0bca /misc | |
parent | c3d8b2fd890d7e486d8643957268c03df61657db (diff) |
Some housekeeping/reorganizing
moving things that need work into extras/
Diffstat (limited to 'misc')
-rw-r--r-- | misc/apache2.conf | 56 | ||||
-rw-r--r-- | misc/varnish.vcl | 55 |
2 files changed, 0 insertions, 111 deletions
diff --git a/misc/apache2.conf b/misc/apache2.conf deleted file mode 100644 index 08471e0..0000000 --- a/misc/apache2.conf +++ /dev/null @@ -1,56 +0,0 @@ -<VirtualHost *:8080> - ServerAdmin drift@gathering.org - ServerName nms.tg16.gathering.org - ServerAlias nms.tg16.gathering.org - - DocumentRoot /srv/tgmanage/web/nms.gathering.org - ScriptAlias /api/write/ /srv/tgmanage/web/nms.gathering.org/api/write/ - ScriptAlias /api/read/ /srv/tgmanage/web/nms.gathering.org/api/read/ - ScriptAlias /api/public/ /srv/tgmanage/web/nms.gathering.org/api/public/ - <Directory "/srv/tgmanage/web/nms.gathering.org/api/write/"> - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - <RequireAny> - AuthUserFile /srv/tgmanage/web/htpasswd-write - AuthName "Tech:Server Secret Volcano Lair" - AuthType Basic - Require valid-user - </RequireAny> - </Directory> - <Directory "/srv/tgmanage/web/nms.gathering.org/api/read/"> - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - <RequireAny> - AuthUserFile /srv/tgmanage/web/htpasswd-read - AuthName "The Gathering Network Management System" - AuthType Basic - Require valid-user - </RequireAny> - </Directory> - <Directory "/srv/tgmanage/web/nms.gathering.org/api/public/"> - AllowOverride None - Options +ExecCGI -MultiViews +Indexes +SymLinksIfOwnerMatch - Require all granted - </Directory> - <Directory "/srv/tgmanage/web/nms.gathering.org"> - AllowOverride None - Options Indexes FollowSymLinks MultiViews - AddDefaultCharset UTF-8 - <RequireAny> - AuthUserFile /srv/tgmanage/web/htpasswd-read - AuthName "The Gathering Network Management System" - AuthType Basic - Require valid-user - </RequireAny> - </Directory> - - ErrorLog /var/log/apache2/error-nms.tg16.gathering.org.log - - # Possible values include: debug, info, notice, warn, error, crit, - # alert, emerg. - LogLevel warn - - CustomLog /var/log/apache2/access-nms.tg16.gathering.org.log combined - ServerSignature On - -</VirtualHost> diff --git a/misc/varnish.vcl b/misc/varnish.vcl deleted file mode 100644 index 754ecbc..0000000 --- a/misc/varnish.vcl +++ /dev/null @@ -1,55 +0,0 @@ -# vim: ts=8:expandtab:sw=4:softtabstop=4 - -vcl 4.0; - -backend default { - .host = "127.0.0.1"; - .port = "8080"; -} - -sub vcl_recv { - if (req.url ~ "^/where" || req.url ~ "^/location") { - set req.url = "/api/public/location"; - } - if (req.method != "GET" && - req.method != "HEAD" && - req.method != "PUT" && - req.method != "POST" && - req.method != "TRACE" && - req.method != "OPTIONS" && - req.method != "DELETE") { - # Vi hater alt som er gøy. - return (synth(418,"LOLOLOL")); - } - - if (req.method != "GET" && req.method != "HEAD") { - /* We only deal with GET and HEAD by default */ - return (pass); - } - - # Brukes ikke. Cookies er for nubs. - unset req.http.Cookie; - - # Tvinges gjennom for å cache med authorization-skrot. - return (hash); -} - - -# Rosa magi -sub vcl_hash { - # Wheee. Legg til authorization-headeren i hashen. - hash_data(req.http.authorization); -} - -# Mauve magi. Hva nå enn det er. -# Dette er WIP - Skal flyttes til backend -sub vcl_backend_response { - set beresp.http.x-url = bereq.url; - if (beresp.http.x-ban) { - ban("obj.http.x-url ~ " + beresp.http.x-ban); - } - if (beresp.status != 200) { - set beresp.uncacheable = false; - set beresp.ttl = 5s; - } -} |