Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #upstream php {
- # server 127.0.0.1:9000;
- #}
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- server_name dom.herfort.eu www.dom.herfort.eu;
- # return 301 https://$server_name$request_uri;
- location / {
- rewrite ^ https://$host$request_uri? permanent;
- }
- location /tv {
- proxy_pass http://127.0.0.1:9981;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $remote_addr;
- }
- }
- server {
- # SSL configuration
- listen 443 ssl http2 default_server;
- listen [::]:443 ssl http2 default_server;
- include snippets/ssl-dom.herfort.eu.conf;
- include snippets/ssl-params.conf;
- root /media/MedienPlatte/nextcloud;
- add_header X-Content-Type-Options nosniff;
- add_header X-Frame-Options "SAMEORIGIN";
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Robots-Tag none;
- add_header X-Download-Options noopen;
- add_header X-Permitted-Cross-Domain-Policies none;
- access_log /var/log/nginx/nextcloud.access.log;
- error_log /var/log/nginx/nextcloud.error.log;
- # -----------------------------------------------------------------------------
- # ------------------------ TV-Headend Server ----------------------------------
- location /tv {
- proxy_headers_hash_max_size 51200;
- proxy_headers_hash_bucket_size 6400;
- proxy_pass http://127.0.0.1:9981;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $remote_addr;
- }
- # -----------------------------------------------------------------------------
- # ------------------------ PHPmyAdmin -----------------------------------------
- location /phpmyadmin {
- root /usr/share/;
- index index.php;
- try_files $uri $uri/ =404;
- location ~ ^/phpmyadmin/(doc|sql|setup)/ {
- deny all;
- }
- location ~ /phpmyadmin/(.+\.php)$ {
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- include snippets/fastcgi-php.conf;
- }
- }
- # -----------------------------------------------------------------------------
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location = /.well-known/carddav {
- return 301 $scheme://$host/remote.php/dav;
- }
- location = /.well-known/caldav {
- return 301 $scheme://$host/remote.php/dav;
- }
- client_max_body_size 512M;
- fastcgi_buffers 8 16K;
- fastcgi_buffer_size 32k;
- fastcgi_connect_timeout 300;
- fastcgi_send_timeout 300;
- fastcgi_read_timeout 300;
- gzip off;
- error_page 403 /core/templates/403.php;
- error_page 404 /core/templates/404.php;
- location / {
- rewrite ^ /index.php$uri;
- }
- location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
- deny all;
- }
- location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
- deny all;
- }
- location ~^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?$
- include fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param HTTPS on;
- #Avoid sending the security headers twice
- fastcgi_param modHeadersAvailable true;
- fastcgi_param front_controller_active true;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_intercept_errors on;
- fastcgi_request_buffering off;
- }
- location ~ ^/(?:updater|ocs-provider)(?:$|/) {
- try_files $uri/ =404;
- index index.php;
- }
- location ~* \.(?:css|js)$ {
- try_files $uri /index.php$uri$is_args$args;
- add_header Cache-Control "public, max-age=7200";
- add_header X-Content-Type-Options nosniff;
- add_header X-Frame-Options "SAMEORIGIN";
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Robots-Tag none;
- add_header X-Download-Options noopen;
- add_header X-Permitted-Cross-Domain-Policies none;
- # Optional: Don't log access to assets
- access_log off;
- }
- location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
- try_files $uri /index.php$uri$is_args$args;
- access_log off;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement