VHOST and DYNDNS redirect

Running several websites on my Nethserver at home. Works really great!
Small problem:
I allways get the dyndns URL, not the official domain address. With my old debian based installation it worked.
Check out www.raisin-titans.de which redirects to raisin-titans.blogdns.com
I want the url to read www.raisin-titans.de not raisin-titans.blogdns.com.
I thought it had to be a setting in the .htaccess in each vhost folder, but it doesn’t work…
here the .htaccess:

RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

These two names have completely different IP addresses. It rather looks like the first is set to a domain/URL forwarding service, while only the second is your actual IP address. If I browse to the second IP address, I get a redirect to HTTPS, which is served by your Neth server (which I surmise from the self-signed certificate for “Example Org”), with “This Page intentionally left blank.” The former IP gives me a black page with a title of “PC-Service / Webhosting / Web & Softwarelösungen”.

So, since www.raisin-titans.de doesn’t resolve to your Neth server, nothing you do on your Neth server can control what happens when someone browses to that name.

1 Like

www.raisin-titans.de is hosted on the old provider. I have a html page which redirects to my home server, which has to us Dyndns, because i get an new IP adress every day.
when you use the IP Adress of my server you will not be redirected to one of the Vhosts, but you access the “pure” apache server, which has no content.

The Problem is hiding the dyndns adress. I had it working before in a simular environment but not with vhosts…

But why use a HTML page for this purpose? That’s exactly the reason you’re seeing what you’re seeing, and it’s as it should be. Just set a CNAME record pointing www.raisin-titans.de to raisin-titans.blogdns.com.

The domain is registered to the IP adress of the old provider. I have to redirect to my server.
could you explain how how I make that CNAME entry? Do have to do it on my nethserver?

It is solved?

No, I can’t; you’d need to ask your DNS provider. This has nothing at all to do with your Neth server.

No, but I don’t think any usable answers are coming…

I guess not, if you don’t know, can’t figure out, and aren’t willing to ask, how to create DNS entries with your DNS host.

Sorry, that previous answer was not a reply to your DNS entry suggestion.
The problem is, I have no access to the DNS entries of my provider.
There is a way to mask the URL and I think I did something like that on my last server:

in the .htaccess file in the root of the virtualhost:

RewriteCond %{HTTP_HOST} https://www.raisin-titans.de
RewriteRule ^(.*) https://raisin-titans.blogdns.com [P]

But nethserver ignores those lines.

I think this would be the solution, not the DNS settings…

This doesn’t make any sense. Is raisin-titans.de your domain? If it is, why can’t you control its DNS records?

Nethserver can’t do anything with those lines, as it never sees the traffic for www.raisin-titans.de–that traffic goes to a different host completely.

You think incorrectly. Nothing you do on your Nethserver is going to make the Internet contact it when the DNS records for www.raisin-titans.de point somewhere else. And if the Internet isn’t contacting your Nethserver, no redirect you set up there is going to be effective.