I wanted to add a sub-domain to an existing site. But it opens not the site itself, but some “default” site… Which says “Success! Your new web server is ready to use.”
Once when saving the domain settings - when I added alias - I had error code 3, but externally everything was preserved.
How do I separate a domain from a “default” site to earn its “native” site?
You want to add an alias to a existing domain, which redirects automatically to the existing domain? If yes, add it to the alias field and create a htaccess rewrite rule.
sub.site.ru should open the same site as site.ru, there is no known issue that aliases arent working.
At me so) perhaps, it was worth prescribing alias before the first appeal to the subdomain. The system may have created this domain somewhere else. But i don 't know where it is
And what does the error # 3 while maintaining the configuration of the site - is the reason for this?
On my previous server I generally do not register anywhere - on any domain, aiming at my ip opened my website - it was convenient) And now I clearly prescribed a subdomain - and it doesn’t want to work))
Any http requests for undefined domains or subdomains that end up on your server will get that default “Succes” page which is located at /var/www/html/
When editing web domains the apache and or nginx services are restarted automatically, if that didn’t happened in your case it could be a Bug, to confirm that on our side we would need the steps to reproduce the problem.
Also you could check if /varlog/hestia/system.log contains entries for v-restart-service after editing a domain.
I only have one record of a restart this month… time - about a couple of hours later, as I edited the domain and created this topic - apparently, this is a manual restart.
nginx was not restarted when I edited the domain
it is unusual for me that in general it is necessary to prescribe some aliases… on my previous server on Vesta, all domains point to the one site - no aliases
Is there a default site for unknown domains? for example, I want all unknown domains to open site.ru - it will be convenient for me.
not that /var/www/html/ , but that /home/mysite/web/site.ru
I do not want to set the site parameters into this file… it’s somehow not elegant. Or should it be replaced, and then the first domain will accept all requests for itself?
I can’t waste a redirector. It is critical for me to immediately respond to the browser
No meta or 301-302 codes
From the point of view of hestia, I have one site - it has different “sites” of users. Users add their domains, I write them to the database. And everything works (on the old server). I am not comfortable writing every domain in the nginx configuration of the site
I don’t think it’s a good idea to modify the conf file itself, they will be rebuild on every hestia upgrade. So if you want to add them to your website, use the alias field in hestia interface when you edit the domain.