Add nginx sample
This commit is contained in:
parent
9ac6a6f3b1
commit
1b59608ff7
1 changed files with 54 additions and 0 deletions
54
README.md
54
README.md
|
|
@ -51,3 +51,57 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
#hackcal [data-uid] span:first-child {flex: 0 0 3em; font-weight: bold}
|
||||
```
|
||||
|
||||
## Sample nginx config
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name hackcal.mydomain.example;
|
||||
|
||||
# Path to the root of your installation
|
||||
root /var/www/hackcal;
|
||||
|
||||
# Charset
|
||||
charset UTF-8;
|
||||
|
||||
# Enable gzip but do not remove ETag headers
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 4;
|
||||
gzip_min_length 256;
|
||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
|
||||
# Remove X-Powered-By, which is an information leak
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
|
||||
index index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_pass php-handler;
|
||||
|
||||
fastcgi_cache phpcache;
|
||||
fastcgi_cache_valid 1m;
|
||||
fastcgi_cache_use_stale error timeout updating invalid_header http_500 http_503;
|
||||
fastcgi_cache_min_uses 1;
|
||||
fastcgi_cache_lock on;
|
||||
add_header X-FastCGI-Cache $upstream_cache_status;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# Serve filtered calendar.ics
|
||||
location = /mycalendar.ics {
|
||||
rewrite ^ /cache/index.php last;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue