das mit grocy.beispiel.domain war ein fehler von mir beim hier ins forum tippen sorry; hab ich jetzt oben auch korrigiert.
Die Konfiguration via sites-avaible und sites-enabled hab ich aus dem englischen Arch-Wiki.Doe funktioniert auch grundsätzlich bei mir; sites-enabled ist auch als include in nginx.conf konfiguriert.
Die restlichen Konfigurationen reich ich gleich nach.
Mir ist jetzt noch was aufgefallen, entschuldigt bitte das ich das vorher selber nicht gechekct habe aber das mit der Umleitung von grocy.beispiel.domain auf matrix.beispiel.domain tritt nur mit https:// auf, ich vermute da ich die grocy.beispiel.domain noch nicht für https eingerichtet habe. Bei http bekomme ich dann den bad gateway (hab ich grade auch mit Port 80 ausprobiert)
/etc/nginx/nginx.conf :
#user html;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
include sites-enabled/*;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
}
#server {
#listen 80;
#server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
#location / {
# root /usr/share/nginx/html;
# index index.html index.htm;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /usr/share/nginx/html;
#}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
#}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
/etc/nginx/sites-enabled/matrix.beispiel.domain
server {
server_name matrix.beispiel.domain;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html/beispiel;
proxy_pass http://localhost:8008;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/beispiel.domain/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/beispiel.domain/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 = matrix.beispiel.domain) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name matrix.beispiel.domain;
return 404; # managed by Certbot
/etc/nginx/sites-enabled/riot.beispiel.domain : (müsste ich eigentlich noch in element umbennen weil da eigtl schon element läuft aber sollte für die benutzung ja erstmal keinen unterschie machen, oder?)
server {
server_name riot.beispiel.domain;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html/riot.beispiel;
proxy_pass http://localhost:8008;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/beispiel.domain/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/beispiel.domain/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 = riot.beispiel.domain) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name riot.beispiel.domain;
return 404; # managed by Certbot
}
/etc/nginx/sites-enabled/beispiel.domain : (bei der hab ich auch viel rumprobiert und bin auch gar nicht sicher ob ich die überhaupt brauche?)
server {
server_name beispiel.domain;
#charset koi8-r;
include /etc/nginx/fastcgi.conf;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.php;
}
#location ~ \.php$ {
# 404
#try_files $uri /index.php$is_args$query_string;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
}
Für die Journaleinträge hab ich grad noch ein bisschen zu wenig Ahnung was da relevant sein kann