
upstream dp2b_plone6 {
    server 127.0.0.1:9180;
}

server {
    server_name  dresden-place-to-be.de www.dresden-place-to-be.de;

    access_log  /var/log/nginx/dp2b.access.log;
    error_log   /var/log/nginx/dp2b.error.log;

    location / {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-Host $host;
      proxy_set_header X-Forwarded-Proto https;
      proxy_pass
      http://dp2b_plone6/VirtualHostBase/https/www.dresden-place-to-be.de:443/dp2b/VirtualHostRoot/;
    }

    # --- upload size limit ---
    client_max_body_size 100M;

    ##### listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/dresden-place-to-be.de/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/dresden-place-to-be.de/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}

server {
    server_name  admin.dresden-place-to-be.de;

    access_log  /var/log/nginx/dp2b.access.log;
    error_log   /var/log/nginx/dp2b.error.log;

    location / {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-Host $host;
      proxy_set_header X-Forwarded-Proto https;
      proxy_pass
      http://dp2b_plone6/VirtualHostBase/https/admin.dresden-place-to-be.de:443/VirtualHostRoot/;
    }

    # --- upload size limit ---
    client_max_body_size 100M;

    ##### listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/dresden-place-to-be.de/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/dresden-place-to-be.de/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
    if ($host = www.dresden-place-to-be.de) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = dresden-place-to-be.de) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

	return 301 https://www.dresden-place-to-be.de/;
	
    listen       80;
    listen       [::]:80;
    server_name  *.dresden-place-to-be.de dresden-place-to-be.de;
    return 404; # managed by Certbot


}
