Habe es jetzt doch mal gemacht.
SO:
Code
server {
listen 80;
listen [::]:80;
server_name xyz.at www.xyz.at NEUE_DOMAIN.eu www.NEUE_DOMAIN.eu;
return 301 https://www.xyz.at$request_uri;
}
server {
listen 443 ssl;
server_name xyz.at www.xyz.at NEUE_DOMAIN.eu www.NEUE_DOMAIN.eu;
ssl_certificate /etc/letsencrypt/live/xyz.at/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/xyz.at/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
root /var/www/xyz.at/html;
index index.php index.html;
add_header Strict-Transport-Security "max-age=31536000";
add_header X-Content-Type-Options "nosniff" always;
#add_header Content-Security-Policy-Report-Only "script-src 'self'; report-uri /_/csp-reports";
add_header Content-Security-Policy-Report-Only "script-src 'self'; default-src 'none'";
add_header Feature-Policy "push 'self'";
add_header Referrer-Policy "strict-origin";
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#fastcgi_pass 127.0.0.1:9000
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location = /status {
access_log off;
allow 127.0.0.1;
deny all;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
location = /ping {
access_log off;
allow 127.0.0.1;
deny all;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
}
Alles anzeigen
Aber es leitet mich von der .eu um auf die .at
Ich würde schon gerne die .eu oben im Browser stehen lassen.