Azshania
Ensign
- Registriert
- Sep. 2011
- Beiträge
- 250
Also wenn beide Domains zu deiner IP führen, dann einmal die config für die cloud:
und für wordpress:
Code:
server {
listen 80;
listen[::]:80;
server_name cloud.meinedomain.de;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name cloud.meinedomain.de;
access_log /var/log/nginx/cloud.meinedomain.de.access.log;
error_log /var/log/nginx/cloud.meinedomain.de.error.log;
location / {
more_clear_headers 'upgrade';
more_clear_headers 'Strict-Transport-Security';
proxy_ssl_verify on;
proxy_pass https://<Adresse zu Nextcloud in internem Netzwerk>;
proxy_pass_header Authorization;
proxy_set_header 'X-Forwarded-Host' cloud.meinedomain.de;
proxy_set_header 'X-Forwarded-Proto' https;
proxy_set_header 'X-Forwarded-For' $remote_addr;
proxy_set_header 'X-Forwarded-IP' $remote_addr;
add_header Front-End-Https on;
}
}
und für wordpress:
Code:
server {
listen 80;
listen[::]:80;
server_name wordpress.meinedomain.de;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name wordpress.meinedomain.de;
access_log /var/log/nginx/wordpress.meinedomain.de.access.log;
error_log /var/log/nginx/wordpress.meinedomain.de.error.log;
location / {
more_clear_headers 'upgrade';
more_clear_headers 'Strict-Transport-Security';
proxy_ssl_verify on;
proxy_pass https://<Adresse zu Wordpress in internem Netzwerk>;
proxy_pass_header Authorization;
proxy_set_header 'X-Forwarded-Host' wordpress.meinedomain.de;
proxy_set_header 'X-Forwarded-Proto' https;
proxy_set_header 'X-Forwarded-For' $remote_addr;
proxy_set_header 'X-Forwarded-IP' $remote_addr;
add_header Front-End-Https on;
}
}