Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user http;
- worker_processes auto;
- worker_rlimit_nofile 100000;
- error_log /var/log/nginx/error.log crit;
- events {
- worker_connections 4096;
- use epoll;
- multi_accept on;
- }
- http {
- #error_log /var/log/nginx/error.log warn;
- open_file_cache max=200000 inactive=20s;
- open_file_cache_valid 30s;
- open_file_cache_min_uses 2;
- open_file_cache_errors on;
- access_log off;
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- gzip on;
- # gzip_static on;
- gzip_min_length 10240;
- gzip_comp_level 1;
- gzip_vary on;
- gzip_disable msie6;
- gzip_proxied expired no-cache no-store private auth;
- gzip_types
- # text/html is always compressed by HttpGzipModule
- text/css
- text/javascript
- text/xml
- text/plain
- text/x-component
- application/javascript
- application/x-javascript
- application/json
- application/xml
- application/rss+xml
- application/atom+xml
- font/truetype
- font/opentype
- application/vnd.ms-fontobject
- image/svg+xml;
- include mime.types;
- default_type application/octet-stream;
- types_hash_max_size 4096;
- server_names_hash_bucket_size 128;
- server_tokens off;
- keepalive_timeout 65;
- # relevant if request takes longer (e.g. large files download) to not timeout to early.
- proxy_connect_timeout 600;
- proxy_send_timeout 600;
- proxy_read_timeout 600;
- send_timeout 600;
- #gzip off;
- server {
- listen 80;
- listen [::]:80;
- server_name myserver.net;
- client_max_body_size 16G;
- #set root to empty directory, in order to avoid exploiting real data
- root /srv/http;
- location / {
- proxy_set_header X-Forwarded-Host $host;
- proxy_set_header X-Forwarded-Server $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://localhost:8080;
- proxy_buffer_size 8k;
- proxy_ignore_client_abort on;
- client_max_body_size 100m;
- }
- location /.well-known/carddav {
- return 301 $scheme://$host/remote.php/dav;
- }
- location /.well-known/caldav {
- return 301 $scheme://$host/remote.php/dav;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment