mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-03 07:35:41 +00:00
initial commit
This commit is contained in:
93
owncloud/nginx.conf
Normal file
93
owncloud/nginx.conf
Normal file
@ -0,0 +1,93 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /var/run/nginx.pid;
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log off;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 15;
|
||||
keepalive_disable msie6;
|
||||
keepalive_requests 100;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay off;
|
||||
server_tokens off;
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 5;
|
||||
gzip_min_length 512;
|
||||
gzip_buffers 4 8k;
|
||||
gzip_proxied any;
|
||||
gzip_vary on;
|
||||
gzip_disable "msie6";
|
||||
gzip_types
|
||||
text/css
|
||||
text/javascript
|
||||
text/xml
|
||||
text/plain
|
||||
text/x-component
|
||||
application/javascript
|
||||
application/x-javascript
|
||||
application/json
|
||||
application/xml
|
||||
application/rss+xml
|
||||
application/vnd.ms-fontobject
|
||||
font/truetype
|
||||
font/opentype
|
||||
image/svg+xml;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
index index.php;
|
||||
root /owncloud;
|
||||
client_max_body_size 10G;
|
||||
fastcgi_buffers 64 4K;
|
||||
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
|
||||
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
|
||||
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
|
||||
error_page 403 /core/templates/403.php;
|
||||
error_page 404 /core/templates/404.php;
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
|
||||
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
|
||||
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
|
||||
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
|
||||
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
|
||||
try_files $uri $uri/ index.php;
|
||||
}
|
||||
|
||||
location ~ ^(.+?\.php)(/.*)?$ {
|
||||
try_files $1 = 404;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
||||
fastcgi_param PATH_INFO $2;
|
||||
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
|
||||
}
|
||||
|
||||
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
||||
expires 30d;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user