- #/etc/nginx/conf.d/gateway.conf
- #
- ############################
- # Port 81 = Gateway #
- # Port 82 = Wordpress #
- # Port 83 = Nextcloud #
- # Port 84 = Stikked #
- # Port 85 = Roundcube #
- # Port 86 = Rainloop #
- # Port 87 = osTicket #
- # Port 88 = Stikked #
- # Port 89 = Office #
- # Port 90 = FF-Sync #
- # Port 91 = Framadate #
- # Port 92 = Conbee #
- # Port 8001 = VDR #
- # Port 32400 = Plex #
- ############################
- #
- ###############################################################
- # Subdomain für Wordpress #
- ###############################################################
- #
- #### Let's Enrypt ####
- server {
- listen 80;
- server_name 192.168.200.10;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- proxy_set_header Host $host;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- #### Wordpress (82) ####
- server {
- listen 443 ssl http2;
- server_name 192.168.200.10;
- charset utf-8;
- include /etc/nginx/ssl.conf;
- include /etc/nginx/proxy.conf;
- include /etc/nginx/header.conf;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_read_timeout 300;
- proxy_send_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- ###############################################################
- # Subdomain für Nextcloud #
- ###############################################################
- #
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- include /etc/nginx/ssl.conf;
- include /etc/nginx/proxy.conf;
- include /etc/nginx/header.conf;
- location = /.well-known/carddav {
- return 301 $scheme://$host/remote.php/dav;
- }
- location = /.well-known/caldav {
- return 301 $scheme://$host/remote.php/dav;
- }
- location ^~ / {
- #
- location = /.well-known/webfinger {
- return 301 /index.php$uri;
- }
- #
- location ^~ /.well-known {
- location = /.well-known/nodeinfo {
- return 301 /index.php$uri; }
- }
- #
- client_max_body_size 10240M;
- proxy_max_temp_file_size 10240M;
- proxy_connect_timeout 300;
- proxy_send_timeout 300;
- proxy_read_timeout 300;
- send_timeout 3600;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- ##############################################################
- # Subdomain für Roundcube #
- ##############################################################
- #
- #server {
- #listen 80;
- #server_name ;
- #charset utf-8;
- #root /var/www;
- #location ^~ /.well-known/acme-challenge {
- #proxy_pass ;
- #}
- #location / {
- #return 301 https://$host$request_uri;
- #}
- #}
- #server {
- #listen 443 ssl http2;
- #server_name ;
- #charset utf-8;
- #include /etc/nginx/ssl.conf;
- #location ^~ / {
- #client_max_body_size 1024M;
- #proxy_max_temp_file_size 1024M;
- #proxy_connect_timeout 300;
- #proxy_send_timeout 300;
- #proxy_read_timeout 300;
- #send_timeout 300;
- #proxy_set_header Host $host;
- #proxy_set_header X-Real-IP $remote_addr;
- #proxy_set_header X-Forwarded-Proto $scheme;
- #proxy_cookie_path / "/; secure; HttpOnly";
- #proxy_pass ;
- #proxy_http_version 1.1;
- #proxy_set_header Connection "";
- #proxy_buffering off;
- #proxy_request_buffering off;
- # }
- #}
- ##############################################################
- # Subdomain für Rainloop #
- ##############################################################
- #
- #server {
- #listen 80;
- #server_name ;
- #charset utf-8;
- #root /var/www;
- #location ^~ /.well-known/acme-challenge {
- #proxy_pass ;
- #}
- #location / {
- #return 301 https://$host$request_uri;
- #}
- #
- #
- #}
- #server {
- #listen 443 ssl http2;
- #server_name ;
- #charset utf-8;
- #include /etc/nginx/ssl.conf;
- #location ^~ / {
- #client_max_body_size 1024M;
- #proxy_max_temp_file_size 1024M;
- #proxy_connect_timeout 300;
- #proxy_send_timeout 300;
- #proxy_read_timeout 300;
- #send_timeout 300;
- #proxy_set_header Host $host;
- #proxy_set_header X-Real-IP $remote_addr;
- #proxy_set_header X-Forwarded-Proto $scheme;
- #proxy_cookie_path / "/; secure; HttpOnly";
- #proxy_pass ;
- #proxy_http_version 1.1;
- #proxy_set_header Connection "";
- #proxy_buffering off;
- #proxy_request_buffering off;
- # }
- #
- #}
- ##############################################################
- # Subdomain für Plex #
- ##############################################################
- #
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- include /etc/nginx/ssl.conf;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_read_timeout 300;
- proxy_send_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_cookie_path / "/; secure; HttpOnly";
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- ##############################################################
- # OnlyOffice #
- ##############################################################
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- include /etc/nginx/ssl.conf;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_send_timeout 300;
- proxy_read_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_cookie_path / "/; secure; HttpOnly";
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- ########################################################
- # Subdomain für FF-Sync #
- ########################################################
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- include /etc/nginx/ssl.conf;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_send_timeout 300;
- proxy_read_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_cookie_path / "/; secure; HttpOnly";
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- ##############################################################
- # Subdomain für osTicket #
- ##############################################################
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- include /etc/nginx/ssl.conf;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_send_timeout 300;
- proxy_read_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_cookie_path / "/; secure; HttpOnly";
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- ##############################################################
- # Stikked #
- ##############################################################
- #
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_send_timeout 300;
- proxy_read_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_cookie_path / "/; secure; HttpOnly";
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- #
- ##############################################################
- # Subdomain für VDR #
- ##############################################################
- #
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- include /etc/nginx/ssl.conf;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_send_timeout 300;
- proxy_read_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_cookie_path / "/; secure; HttpOnly";
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- #
- #### Mailcow ####
- #
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- include /etc/nginx/ssl.conf;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_send_timeout 300;
- proxy_read_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_cookie_path / "/; secure; HttpOnly";
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- ##############################################################
- # Framadate #
- ##############################################################
- #
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- location ^~ / {
- include /etc/nginx/proxy.conf;
- include /etc/nginx/header.conf;
- #access_log /var/log/nginx/date.access.log;
- #error_log /var/log/nginx/date.error.log;
- root /var/www/framadate/;
- index index.php;
- location ~^/(\.git)/{
- deny all;
- }
- location ~ /\. {
- deny all;
- }
- location ~ ^/composer\.json.*$|^/composer\.lock.*$|^/php\.ini.*$|^/.*\.sh {
- deny all;
- }
- location /admin/ {
- location ~ \.php$ {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- include php_optimization.conf;
- fastcgi_pass php-handler;
- fastcgi_param HTTPS on;
- }
- try_files $uri $uri/ =401;
- }
- location / {
- rewrite "^/admin$" "/admin/" permanent;
- rewrite "^/([a-zA-Z0-9-]+)$" "/studs.php?poll=$1" last;
- rewrite "^/([a-zA-Z0-9-]+)/action/([a-zA-Z_-]+)/(.+)$" "/studs.php?poll=$1&$2=$3" last;
- rewrite "^/([a-zA-Z0-9-]+)/vote/([a-zA-Z0-9]{16})$" "/studs.php?poll=$1&vote=$2" last;
- rewrite "^/([a-zA-Z0-9]{24})/admin$" "/adminstuds.php?poll=$1" last;
- rewrite "^/([a-zA-Z0-9]{24})/admin/vote/([a-zA-Z0-9]{16})$" "/adminstuds.php?poll=$1&vote=$2" last;
- rewrite "^/([a-zA-Z0-9]{24})/admin/action/([a-zA-Z_-]+)(/([A-Za-z0-9]+))?$" "/adminstuds.php?poll=$1&$2=$4" last;
- try_files $uri /index.php;
- }
- location ~ \.php$ {
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_index index.php;
- include fastcgi_params;
- include php_optimization.conf;
- fastcgi_pass php-handler;
- fastcgi_param HTTPS on;
- }
- }
- ##############################################################
- # Subdomain für Phoscon Conbee #
- ##############################################################
- #
- server {
- listen 80;
- server_name ;
- charset utf-8;
- root /var/www;
- location ^~ /.well-known/acme-challenge {
- proxy_pass ;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl http2;
- server_name ;
- charset utf-8;
- location ^~ / {
- client_max_body_size 1024M;
- proxy_max_temp_file_size 1024M;
- proxy_connect_timeout 300;
- proxy_send_timeout 300;
- proxy_read_timeout 300;
- send_timeout 300;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_cookie_path / "/; secure; HttpOnly";
- proxy_pass ;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_buffering off;
- proxy_request_buffering off;
- }
- }
- }