Commit blank nginx config

This commit is contained in:
vale
2016-05-23 20:17:49 +02:00
commit 29c04348c1
24 changed files with 5006 additions and 0 deletions

68
sites-available/default Normal file
View File

@ -0,0 +1,68 @@
# 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;
}
}

View File

@ -0,0 +1,33 @@
# Server configuration
server {
server_name sub.domain.tld;
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
include snippets/ssl-sub.conf;
include snippets/force-ssl.conf;
include snippets/no-www.conf;
root /data/www/default-sub/public_html;
index index.php index.html index.htm index.md;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
include snippets/php-fpm.conf;
include snippets/md.conf;
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /\.ht {
deny all;
}
}