I’ve read a lot about rewrite options, virtual host configurations but, as you may already have noticed, im a complete noob programming php and html or what else!
Hi! So my guess is you have port forwarding done and you do not have a static IP address from your internet service provider, so you will have to do something like use the DuckDNS dynamic domain name service to associate your a domain name with a potentially changing IP address from your ISP. You will have to put your dynamic domain name in your web server settings (assuming it’s Apache, in the apache config file you made for your website) and then restart your web server.
Once that is complete, you will have to go to the website that you purchased your domain name from and see if they will let you create a CNAME record in their DNS settings. What you will do is point that CNAME record to your duckdns.org name that you created in DuckDNS. With the CNAME record name, you can put the purchased domain name in your apache config file and then reboot the server. Then, in your Nextcloud config file you will need to add both your dynamic domain name and your purchased name. I would also HIGHLY recommend getting an SSL/TLS certificate for your Nextcloud instance too
I do have a static IP! I do not have port forwarding because it wasn’t necessary.
Do I have to activate port forwarding? I use https with a self signed certificate.
No worries, and you have your domain name in your Apache configs correct? You will also have to edit the config.php file in nextcloud/config to add your domain name to the trusted domains array, like:
Should be able to access the website via the domain name then. I’ve also had it where I’ve needed to have an internal DNS server with a local record so that your clients access the server internally instead of reaching your server via an external record. Then I would have DHCP tell local machines what DHS server to use, but try the configs first and see if that will help
And you edited your apache configs too? And you also pointed your domain name to your IP address with the domain registrar? If you did all of those it should work
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Require all granted
</FilesMatch>