VestaCP - All domains point to the same website. Why? - http

I have a bit of a problem. I setup several new domains on VestaCP, but they all point to the same default website. Part of the problem I guess is that all DNS records point to the same IP, but Vesta doesn't seem to know which website to take you to, so it takes you to a default website.
However, this problem only happens with HTTP, HTTPS forwards to the correct website. I don't know why. Is there a .conf somewhere that needs to be edited, or am I doing something wrong in VestaCP?
My setup is running on Digital Ocean -- Ubuntu 18.04, Nginx + php-fpm
Your help appreciated.

Chceck if all DNS goes to IP of server with VestaCP. If yes, try look into /home/yourloginname/web Is there every your website? If yes, try to look to aliases. If you have subdomains, maybe head domain have alias *.domain.com .
And if your answer was no for some of questions above, try look into /etc/bind/named.conf where should have every domain 1 row for example:
zone "domain.eu" {type master; file "/home/admin/conf/dns/domain.eu.db";};
If not, add this one. Hope will be helpful.

Related

How to forward domain/url to website content host, but show old/real/company url?

Sorry if some of this is app specific, I'll try to keep it general.
I am administrating a website that uses the UnoEuro webhotel for DNS and I'm using wordpress hosted by wp-engine for the website itself.
More or less "www.MyDomain.com" needs to show the content from "www.wpengine.com/MyDomain", but of course when people go to MyDomain they should not see wpengine/MyDomain.
When I navigate the site it should also happen via MyDomain, like so -> "www.MyDomain.com/SubDomain".
(I think I have this part figured out as the webhotel has an option to "include path in forwarding")
UnoEuro gives me choices between 301 and 302 forwarding, I don't think its related, but I don't know what else to look for.
So GENERALLY speaking how do you do this in most DNS services?
(The reason I need to know is that I am moving the DNS service from an old hotel no longer used and I was not the one who set that up so I don't know how it is done.)
Ok the solution was to add NOT forwarding, but DNS records/bindings that bind the domain to the host IP.
Specifically 3 identical "type A" bindings/ records were added with TTL=150 (DNS update time seconds I think). I don't know why there is 3 identical ones...
It turned out the webhotel had an option to "Import from the current DNS" and then I just changed the mail server IP to the new one.

Can a single hosts file entry contain multiple domains/sub-domains?

May be this is a weird question, but I am curious to know if single hosts file entry can contain multiple domains on same line?
I know that following is okay for host entry:
127.0.0.1 somedomain.com
But, I want to know if following would work:
127.0.0.1 somedomain.com, alternate-domain.com, subdomain.domain.com
or
127.0.0.1 somedomain.com, *.domain.com
(Note: I am doing hosts file entries on windows)
May be this has been asked before, but I googled before writing my question, and I didn't quite find a good answer. Thanks for taking time to read and answering, it will be pretty helpful.
I found the solution.
On IIS, I had to add https in bindings associating it to use IIS Development Certificate for SSL in my development environment.
Also, in the process I found that both of the following wiil work for me.
127.0.0.1 somedomain.com, alternate-domain.com, subdomain.domain.com
or
127.0.0.1 somedomain.com alternate-domain.com subdomain.domain.com
Spaces and commas both work, and I can add multiple domains, subdomains combinations on same line.
Also, if you are moving from a non-secure domain to secure domain/subdomain, SSL certificate needs to be setup on web server for it, else it would end up showing an error in the browser.
Cheers!

How do I give access to another computer on my network, to my website hosted locally?

We have a local instance of IIS 7 running with a website. Instead of the default "localhost" we have something like, mysite.compname.com. This is a separate entry into IIS 7 and the default website was removed to prevent confusion.
Then in our host file we an entry like this:
127.0.0.1 mysite.compname.com
Now when I try to hit this url, http://127.0.0.1/ApplicationName/Project/AddProject.aspx technically it should work, but instead I get a 404. I can vouch that this isn't a problem with the application, because if I navigate to http://mysite.compname.com/ApplicationName/Project/AddProject.aspx it works fine.
My end goal is to be able to give someone my computer name, so that they can visit a test page, so the url above I think would get turned into this http://computername/ApplicationName/Project/AddProject.aspx. Any help or at least links to understanding would help because I'm not sure where my issue is coming from.
It sounds like the IIS site / application is configured using a Host Header.
This means that the site will only respond if the host header sent by the browser matches the one configured for the site.
This is a standard method to allow one server to host sites for many host and domain names.
If you wish to allow others to view the site on your computer you will need to either have a local DNS server which you can edit, or, probably the easiest option, get them to edit their host files to include
<your IP> mysite.compname.com.
Remember to open the requisite ports (probably only 80, maybe 443 for https) in your firewall.
Or, you can try to edit the site config to remove or modify the Host Header requirement. See the first link for details, but be careful, it's easy to break things if you don't know the entire architecture of the site.

Apache domainname instead of IP

I'm not sure this is even a question to be asked here, but I'll give it a shot anyway.
So I have an ubuntu server, and I recently purchased a domainname.
Now I have forwarded the domain to my IP, but whenever I reach the server, the browser shows the IP adress instead of the domain.
Is this something I should configure in Apache, or from godday (where I got the domainname)
Thanks in advance :)
Start with checking your setup at Godaddy. What you probably need is an A entry.
The good news is that your setup seems to work since you get an answer from you server!
Perhaps this can help
http://support.godaddy.com/help/article/680/managing-dns-for-your-domain-names

Accessing subdomain via IP address on apache server

I have installed WordPress on a subdomain that currently resides on an unpropogated domain. (It can only be accessed via IP address.) Is it possible for me to access any subdomains that have been created, eg: subdomain.mysite.com/wp-admin via IP, or do I have to wait till the domain has been propogated?
This is my first question, I apoligize if I have not explained my self thoroughly enough. Thanks in advance for any help.
you can use http://[IP]/~[username]/[domain.tld]/ to access your site by IP.
Where [IP] is the IP of your server and [username] is your username for the hosting site. [domain.tld] is the name of the folder on which you have mapped your subdomain.
You may be able to check it with an anonymous proxy?
I use http://anonymouse.org/anonwww.html to check sites as in Australia it normally takes a little longer to propagate over to here.
Please note: You will only be able to check it's existence, you would not use this to make site modifications through the back end. That would best be done once the domain propagates.
Hope this helps ;)

Resources