I am a newbie there but trying to experiment and learn.
I have an instance of Nextcloud running on my Turris Omnia perfectly. I have my own domain for my personal uses. What I want to do is redirect a subdomain of my domain to my Nextcloud instance hosted on my Omnia. I have already redirected my subdomain to my public IP. But now I am struggling with the config of the router.
I understand I need to open the ports, change some Lighttpd seetings, and I guess also take car of some PHP/Nextcloud options.
Does anyone could guide me in opening the goods ports, redirecting the requests to my Nexcloud instance (subdomain already added to trusted subdomain in Nextcloud config file), and kind of config properly so that the whole thing is decently secured?
I would suggest configure nginx for proxy redirect on your domain.
You can then have multiple redirection for sites on your omnia router in lxc containers or even within your local network for nas, satellite receiver, webcam you name it.
just configure nginx on omnia itself and redirect port 443 to nginx exposed to internet then create configs like those for all your sites and you have to register 3rd level domain on your domain name server provider as CNAME record to your domain
just an example as how the configuration can look alike and what is possible to archieve, just google around for more details and tailor it to your needs
nginx proxy redirect looks like this
server {
listen 443 ssl;
server_name nextcloud.mydomain.cz;
ssl_certificate /srv/lxc/ubuntu/rootfs/etc/letsencrypt/live/mydomain.cz/fullchain.pem;
ssl_certificate_key /srv/lxc/ubuntu/rootfs/etc/letsencrypt/live/mydomain.cz/privkey.pem;
include /srv/lxc/ubuntu/rootfs/etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /srv/lxc/ubuntu/rootfs/etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
ssl_session_cache builtin:1000 shared:SSL:10m;
access_log /var/log/nginx/nextcloud.mydomain.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the It appears that your reverse proxy set up is broken" error.
proxy_pass http://192.168.1.25;
proxy_read_timeout 90;
proxy_redirect http://192.168.1.25 https://nextcloud.mydomaincz;
}