Virtual Hosts redirecting to ip address - magento-1.9.1

I have multiple domain in one ip address.One is Magento and another is normal html site.I set up virtual hosts in Nginx configuration but then only when I access to my Magento site (xxx.com) it automatically redirects to ip address.
How can I stop showing my ip address and keep my domain in the browser?

Your config is OK. Redirect probably comes from Magento engine.

Related

Apache site configuration limit access by server IP

I've searched the internet, but I can only find information about blocking requests from certain IP-addresses of visitors. That's not what I'm looking for.
What do I want? Hence the following situation, I'm running an apache webserver hosting a website for https://example.com on public IPv4 address: 1.2.3.4
Visitors access the site by browsing to https://example.com, but the webserver is also listening to browser requests on the servers public IPv4 address 1.2.3.4, which also serves the site. How can I disable that Apache is serving the website over the server's public IPv4 address? I only want the site to be accessible over it's site-url / domain.

Redirect IP to domain issue

I have following domain name air8kissen.de. When I type in that domain name in browser it gets redirected to its IP address 178.128.117.168. The problem is that I setup SSL for domain name and since IP dont have SSL it shows the warning sign. When I accept to risk visiting the website, it redirects me to my domain name.
I have setup all necessary CNAME and A records inside Digitalocean domain setup and have no idea why it shows the IP address first time I visit to domain.
What should I do to fix this?
Cheers
This is not a DNS or SSL issue, You need to setup the Virtual Host for your domain at your webserver, and check any redirection rules placed at your webserver level.

configure apache such that any domain pointing to ip address to redirect to a folder

I'm newbie to apache config.
Is it possible to configure apache dynamically such that any domain pointing to IP address using A Records to redirect to a folder in my server?
Please assist me how this can be done or check to do this task.

Apache/htaccess disallow other domains with same IP

I just setup a brand new server at my host (NOT on a shared host btw), and apparently this IP was used previously and I keep getting requests in the apache logs for people going to that old domain (that has the same IP that has not been changed in DNS). Is there a simple way to tell Apache or htaccess to ONLY allow the domains I have defined there to serve my site, and ignore/drop/redirect others that aren't to my domain?

(Cpanel Centos 7.2) Prevent external domain to access my domain just by pointing ip address

I have a user account with dedicated ip address on cPanel (WHM) and a website e.g. www.domain1.com is running on that. If i use same ip address to point some external domain www.domain2.com to that account ip without adding it as addon domain, it serves the website present on that ip (www.domain1.com) on www.domain2.com. How can I restrict that if possible?
You can't really 'prevent' it - for example, I could buy a domain name and point it at your website.
However, what you can do is add a 'redirect' to your site. So, if the domain used to access your site is not your domain, then redirect the client to your domain name
I don't really know cPanel, but this appears to be what you want
https://documentation.cpanel.net/display/ALD/Redirects