git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub vcl_deliver { | |
if (req.url ~ "/fonts/") { | |
set resp.http.Access-Control-Allow-Origin = "*"; | |
set resp.http.Access-Control-Allow-Methods = "GET, OPTIONS"; | |
set resp.http.Access-Control-Allow-Headers = "Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function show_img_vars($html, $id, $caption, $title, $align, $url, $size, $alt) { | |
// round up all the variables that get passed so we can test them | |
$vars = "html = $html\n"; | |
$vars .= "id = $id\n"; | |
$vars .= "caption = $caption\n"; | |
$vars .= "title = $title\n"; // this will end up blank no matter what | |
$vars .= "align = $align\n"; | |
$vars .= "url = $url\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name observium.yourdomain.com; | |
access_log /var/log/nginx/observium-access_log combined; | |
error_log /var/log/nginx/observium-error_log warn; | |
root /opt/observium/html; | |
client_max_body_size 10m; | |
client_body_buffer_size 8K; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## | |
# GZIP | |
########## | |
gzip on; | |
gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon; | |
########## | |
# CACHE | |
########## | |
location ~ \.(css|htc|less|js|js2|js3|js4)$ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:ff=unix:ts=2:sw=2:ai:expandtab | |
# Cache location setup - this should be the NAS | |
proxy_cache_path /var/cache/nginx | |
levels=1:2 | |
keys_zone=bundle-cache:8M | |
max_size=100000M | |
inactive=3M | |
loader_threshold=330 | |
loader_files=1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy_cache_path /var/lib/nginx/cache/staticfiles levels=1:2 keys_zone=staticfilecache:10m max_size=50m; | |
proxy_cache_path /var/lib/nginx/cache/php levels=2:2 keys_zone=php:10m inactive=20m max_size=50m; | |
proxy_temp_path /var/lib/nginx/proxy; | |
proxy_connect_timeout 30; | |
proxy_read_timeout 120; | |
proxy_send_timeout 120; | |
#IMPORTANT - this sets the basic cache key that's used in the static file cache. | |
proxy_cache_key "$scheme://$host$request_uri"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
proxy_cache_path /tmp/cache levels=1:2 keys_zone=photo-cache:8m max_size=5000m inactive=43829m; | |
proxy_cache_key $host$uri$is_args$args; | |
server { | |
proxy_cache photo-cache; | |
listen 80; | |
server_name cdn.matsimitsu.com; | |
access_log logs/cdn.access.log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend app1 { | |
.host = "127.0.0.1"; | |
.port = "8000"; | |
} | |
acl purge { | |
"127.0.0.1"; | |
"::1"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
.first_byte_timeout = 60s; | |
.connect_timeout = 60s; | |
.between_bytes_timeout = 60s; | |
.max_connections = 200; |
OlderNewer