i have a server that has a common dns and hosts multiple containers of different applications but the problem here for each domain name for an application, any app on the server can be accessed with the right port number. i have an internship management system and hospital management system on a single server with the respective domains; ims.ius.ca.com and hms.ius.ca.com where the common dns is "ius.ca.com". These two application have different port numbers 2301 and 2401 respectively. However, when a user keys hms.ius.ca.com:2301 the internship management system application is accessed instead of the hospital management. How do I resolve this conflict.
I agree with #Martheen The common solution for this problem is to have a reverse proxy in front of your applications (docker applications). You could use Nginx or HAProxy as reverse proxy.
Related
This is my first VPS, so I am pretty new to administrating my own box. I already have experience with a managed web server, registrars, DNS settings, etc. The basics. Now I'd like to take it a step further and manage my own VPS to run multiple services for different business and private projects.
So far I got an VPS from Contabo, updated the system, set up a new user with sudo rights, secured the root user, configured Ufw, installed Nginx with server blocks for two domains and created SSL certificates for one domain using Certbot.
Before I go on with setting up my VPS, I'd like to verify my approach for hosting multiple services for multiple domains makes sense and is a good way to go.
My goal is to host the following services on my VPS. Some of them will be used by all projects some only by a single one:
static website hosting
dynamic website hosting with a lightweight CMS
send and receive emails
Nextcloud/Owncloud
Ghost blog
My current approach is to run all services except for Nginx and the mail server with Docker. Using Nginx as proxy to the services encapsulated in Docker.
Is this an overkill or a valid way to go forward in order to keep the system nice and clean? Since I am new to all of this, I am unsure if I also could run all of the services without using Docker but still be able to serve the different projects on different domains without messing up the system.
Furthermore, I'd like to make sure, that access to the services and the stored data is properly separated between the different tenants (projects). And of course ideally the admin of the services is kind of manageable.
I "own" a URL www.example.com which is currently hosted by One.com. I recently built my own server running a LAMP stack and it serves pages to the internet from /html as it should, but is only accessible via numeric IP address. In the past I've re-assigned the name servers for URL's but only using a hosting company's "dashboard" or GUI. I've read about changing the DNS settings in Ubuntu (my server is running 18.04) and also I've researched what I can into Google's public DNS and DynDNS services.
So I have two sets of questions. First, is it possible to "connect" or "bind" a URL to the static IP address of my own server without using a DNS service? Can it be done through any kind of public registry and if not, what are the least expensive but still reliable options?
Second, is basically "Why bother?" I do understand the value of a human-readable address but also, the address bar isn't realistically used anymore. Most of the security value of having human readable addresses depends on users actually looking at the address bar so that's becoming a moot argument. People only navigate the web now through links and Google searches, and the address bar is essentially a developer tool. It seems like I can pretty much replace the need for DNS with masked links and meta titles?
You need to set your domain's "A Record" in DNS to point to your server's IP address. While not neccessary, you can configure Apache to respond to the correct domain with virtualhosts [https://httpd.apache.org/docs/2.4/vhosts/name-based.html ], but you will need the DNS configured correctly first.
It is not possible to bind a domain to an IP address without DNS - DNS or Domain Name System is THE authoritative system for doing so. It's how the world wide web functions.
Here is some additional reading on what DNS does and why it's important: https://www.cloudflare.com/learning/dns/what-is-dns/
My company is about provide e-commercial website service and finding the best solution for deployment.
Our application is a multi-tenant e-commercial application. Once purchased, our customer has a website. The newly created website can be browsed by default subdomain on our domain (our domain is invishop.com) eg: mikeshop.invishop.com. The website also can be browsed by customer's custom domain. This requires to create CNAME record to our domain name (invishop.com). Our multi-tenant application is developed in ASP.NET MVC platform.
The simplest solution our considered is Windows hosting with Dedicated IP but this solution does not meet big users requirement. Our application will be used by up to 1000 or higher at a same time. If we deploy our service on shared ASP.NET hosting our service is always can not access. We want to run our application on higher availability Infrastructure but do not want to focus on building and managing Infrastructure. We only want to focus on develop our application and business.
So what service we should use ?
You can use Azure virtual machines for hosting. VMs are scalable and you can make availability set with other VMs. So, if is going down (update etc), the second will working. You can create virtual network and assign some VMs to it (Web server and database server). You can use backup services for each VM too.
You can make VM with dedicated IP - Be careful it is possible to configure ONLY before you make VM - you must use PowerShell.
Create dedicated IP via PowerShell (see on internet commands)
Create virtual network (not necessary)
create VM - web server and assign it to IP via PowerShell
create VM - SQL server
Configure server for IIS - it is possible to host multiple websites on one VM via host names (I use this). Add A record to your domain(xyz.com and www.xyz.com and your dedicated IP)
I have been looking for the answer to this but unable to find it thus far.
I have an Azure Windows VM with 3 Websites on it. I have managed to configure one domain to point at the IP Address of the Server (A Record) but when I try to point domains to the other two sites, I cannot specify the port number.
How would I go about getting additional custom domains to point at different ports on my VM?
Thanks! Tom
You cannot map different domains to ports.
What you can do, is map domains to specific sites on IIS and have them listen to that specific hostname. Godaddy has a guide on how to do that here
I have three different webroles in my azure solution.
They are all deployed to xyz.cloudapp.net:
webrole 1 at port 81
webrole 2 at port 82
webrole 3 at port 83
For accessing webrole 2, I need url xyz.cloudapp.net:82. I have noticed that the ports in the url get blocked by some firewalls so I want to get rid of the port.
What is the best method to exclude the need for ports in the url?
Take a look at:
http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
http://channel9.msdn.com/Shows/Cloud+Cover/Cloud-Cover-Episode-37-Multiple-Websites-in-a-Web-Role
You should be able to do it with host headers and CNAME mappings. But not sure if you can with the cloudapp.net URL.
A couple of options. The easiest way is to change your web roles so they're each have their own service/deployment. This would mean that you could run them all on port 80 and they'd have their own url e.g. xyz.cloudapp.net, xyztwo.cloudapp.net, xyzthree.cloudapp.net. It has the side effect that it is easier to deploy each of them separately.
If you have a domain that you're using for your app e.g. xzy.com then you could setup all three of the web roles to be sites under one web role using host headers to distinguish between them. Then you could add CNAMEs for www.xyz.com, two.xyz.com, three.xyz.com all to point to xyz.cloudapp.net.
Actually you can also use a single web role with multiple instances. Then the work load will be evenly distributed to those instances. If you have a single code base, the best choice is to use a single web role with multiple instances. They can use a single port 80 on the load balancer. If you have different requirements for different applications, then please multiple roles. In this case you can either host them in different hosted services (so they use different domain names but can use the same port), or host them in the same hosted service as knighpfhor pointed out.
Best Regards,
Ming Xu.