69 lines
1.5 KiB
Plaintext
69 lines
1.5 KiB
Plaintext
# Server configuration
|
|
|
|
upstream php-handler {
|
|
server 127.0.0.1:9000;
|
|
}
|
|
|
|
server {
|
|
server_name vapcloud.mooo.com;
|
|
|
|
listen 80;
|
|
listen 443 ssl spdy;
|
|
|
|
include snippets/ssl-vapcloud.mooo.com.conf;
|
|
include snippets/force-ssl.conf;
|
|
|
|
include snippets/no-www.conf;
|
|
|
|
root /var/www/owncloud;
|
|
|
|
index index.php;
|
|
|
|
client_max_body_size 10G;
|
|
fastcgi_buffers 64 4k;
|
|
|
|
gzip off;
|
|
|
|
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 / {
|
|
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;
|
|
|
|
# First attempt to serve request as file, then
|
|
# as directory, then fall back to displaying a 404.
|
|
try_files $uri $uri/ /index.php;
|
|
}
|
|
|
|
# deny access to .htaccess files, if Apache's document root
|
|
# concurs with nginx's one
|
|
location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
|
|
deny all;
|
|
}
|
|
|
|
location ~ \.php(?:$|/) {
|
|
include snippets/fastcgi-php.conf;
|
|
}
|
|
|
|
location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
|
expires 30d;
|
|
# Optional: Don't log access to assets
|
|
access_log off;
|
|
}
|
|
|
|
}
|