custome domain mapping to project running on azure with different port - azure

There are 6 projects running on single instance with different port.
which are
http://stanthony.cloudapp.net
.
.
http://stanthony.cloudapp.net:86
Now I want to run each urls with different Domain, I did CNAME mapping with a domain but still same problem that all the ports are running with this single domain
www.kpmaurya.org
.
.
www.kpmaurya.org:86
I want to run all these urls with different domain
please let me know hoe can it be possible.

In an Azure Web Role's service definition file you have a section for adding sites. Within this site you can add bindings section for each of you 6 sites with host header set to each of your custom domain.
Please refer this link for more details : http://msdn.microsoft.com/en-us/library/windowsazure/gg433110.aspx

Related

Custom domains with Azure Websites (Multi tenant)

This article - https://msdn.microsoft.com/en-gb/library/hh534477.aspx#sec7 explains the below approach on how to let customers add custom domains and map to your application.
As an alternative you could allow each tenant to create its own DNS entry that maps a domain or subdomain owned by the tenant to one of your application’s DNS names. For example, Adatum could create the following DNS entry in its DNS configuration:
surveys.adatum.com CNAME adatum.tailspinsurveys.com
Or Adatum could create the following entry:
surveys.adatum.com CNAME www.tailspinsurveys.net
In either case you could use the custom domain name in your ASP.NET routing by using the technique suggested in option 3 above, or use the Request.Url class in your code to identify the domain.
I can achieve this so far with subdomains but when I create the CNAME below to my application I end up with a 404 (Web App not found). I don't want to have to add a custom domain inside azure for each customer. I'd like to automate the process for my SaaS site.
Thanks
when I create the CNAME below to my application I end up with a 404 (Web App not found)
It seems you do not configure the custom domain correctly. I would suggest you use Dig Web interface to trace your DNS domain. Please also check your steps from this article to ensure the custom domain is configure correctly.

Host multiple sites under the same hosting account

Can I know is it possible to have multiple sites under the same hosting account.
public_html/ - Access this via www.example-site.com
public_html/site1 - Access this via www.example-site1.com
public_html/site2 - Access this via www.example-site2.com
As you can see here, I have purchased three domain names. Now I need to link them into relative folders using Nameserves.
Can I have three different name servers from the same hosting account based on the folders?
How can I set Nameserves to match the correct folder?
(I'm using one HostSG VPS account and 3 goDaddy domain names)
Thanks for the support!
You have to add your new site as an Addon-Domain From the cpanel. You don't have to create Name Servers to every single site. You Can Point Existing Name Server with all your sites.
Please follow the below link. It will explain in detail how to add an Addon Domain
Managing Multiple Domains from a Single Hosting Account
There is an option on your cpanel to addons New Domains, once the domain is registered, when you add it, it will automatically create a folder for you with some configuration.

Azure Websites - Masking Azure domain name

In the next several months we will be going live with a web app ('MyApp') that is being hosted on Azure. We have purchased the MyApp.com domain and our Azure domain name is MyApp.azurewebsites.net.
We do not want our users to ever see the azure domain name in any form. We want them to see www.MyApp.com or www.MyApp.com/Sales/ViewSale etc.
I think I know how to map www.MyApp.com to MyApp.azurewebsites.net based on this article. We won't be able to set this up for a while, so I'd like to know what the user will see in their browser URL when they go to www.MyApp.com. Will they see www.MyApp.com or MyApp.azurewebsites.net? And then what will they see as they navigate various pages in the app?
Your azure website needs to be at least at the 'shared' level. This is the first tier of 'paid' azure website hosting. You do this under website > scale.
app service plan pricing tier = shared.
then you would choose 'configure' and look for 'domains' and add your www.myapp.com domain.
Then you head out to your DNS manager and add a CNAME record that directs traffic from www.myapp.com to myapp.azurewebsites.com, OR you can lookup up the Virtual (public) IP of your azure website and update the A record in your DNS manager.
Either route, your visitors will see www.myapp.com/mypage, www.myapp.com/mypage2, etc.
Once you have the proper hosting level (the control panel will tell you, look for custom domains) and configuration, they can access it as www.myapp.com. You may need to provide your own SSL cert in order to configure it as well.
When it comes time to SSL, check out this post (Azure SSL Certificate) that I made regarding uploading of SSL certs in the control panel. It will save you a headache.
The article you linked appears to have solid information based upon my recent experiences. One thing to note: It has screen shots from the old configuration panel, so some things may look different in the new one.
I haven't found a way to hide the myapp.azurewebsites.com method to access a page, other than maybe doing a redirect inside your code. However, until you have your DNS setup it might be nice to see things working under that domain to start.

Setting up a virtual application to work as subdomain on Windows Azure Web Sites

I've installed a php application that requires to set up 2 virtual hosts, one for the front-end website and one for the admin panel website. The proper configuration should be as follow:
Virtual host 1 www.domain.com path:Site/src/site/public
Virtual host 2 admin.domain.com path:Site/src/site/admin/public
On Windows Azure I did as follow:
I added 2 custom domains: www.domain.com and admin.domain.com
I added a new virtual application under the "virtual applications and directories" area and now I have these 2 virtual applications:
/ site\wwwroot\Site\src\site\public
/admin site\wwwroot\Site\src\site\admin\public
When I open the address www.domain.com I see what I'm supposed to see as front end website. If I open the address www.domain.com/admin the admin panel is not working properly because it's supposed to be set up as subdomain and not as subdirectory.
Now I need to map http://www.domain.com/admin so that il looks like http://admin.domain.com
Any ideas of what needs to be done to make this type of configuration work on Azure Web Sites?
Yes, you're not configuring things at the right level. In fact, the good news is that you don't have to configure much of anything when it comes to virtual hosts / virtual applications; Azure Web Sites are already virtual in that way and run on shared instances pools.
In free/shared mode, you share instances with other users, in reserved/standard mode your sites only share instances with your other sites in the same subscription and same region (data center).
All this means that you can create as many Azure Web Sites as you need, and they will all run on the same instance (at least until they need to be scaled out, which is automatic).
In your case, you'll have two Azure Web Sites: domain-www and domain-admin. The former will be bound to www.domain.com and the latter to admin.domain.com. Of course, the names of the sites are completely arbitrary, you don't have to follow any kind of convention (though it may help).

what are the pros and cons of setting virtual host in Liferay?

I am using multiple domains to access liferay portal instance.
For example following are the domains mapped in hosts file of windows:
www.liferaytest1.com
www.liferaytest2.com
and in Liferay's Control Panel → Portal Settings, www.liferaytest1.com is set as virtual host.
I can access portal instance with all above mention domains along with localhost.
When I access portal with www.liferaytest1.com then I can access Guest site pages directly. Say, home is a page in Guest site then instead of accessing with www.liferatest1.com/web/guest/home I can access it directly with www.liferaytest1.com/home
So URL is shortened to some extend.
So far so good.
First Concern
Now when I try to access portal via www.liferaytest2.com and when I click any sites listed in My Sites portlet of Liferay, it redirects me to that site with the domain mentioned in virtual host i.e. www.liferaytest1.com instead of retaining www.liferaytest2.com.
Suppose I have a Site named Help, so when I click on help site link in My Sites portlet then instead of staying with www.liferaytest2.com domain it redirects me with www.liferaytest1.com domain.
This is due to virtual host mapping done in liferay.
Second Concern
When I am accessing the portal with www.liferaytest2.com and subscribe to any of the Assets then the links in email contain the virtual host domain i.e www.liferaytest1.com.
How to overcome above mention issues?
My requirement is to stay relative to the portal accessing domain.
When I access portal via www.liferaytest2.com then it should not redirect me to www.liferaytest1.com on-click of any of the Site-links as explained above and also emails that I would be getting should also be relative to the domain I am accessing i.e. www.liferaytest2.com.
First of all: You're not required to use that feature - it's implemented in a certain way (e.g. as you describe) and if that doesn't suit your needs, there's no need to configure individual virtual hosts. There's no problem serving all content through just a single virtual host or do the resolution on Apache (e.g.) - that is, fully external to Liferay. The only drawback is that you'll need the clue of the site you want to access (e.g. /web/guest as part of the URL) so that Liferay knows what content to serve.
However, you might be closer to what you'd like to achieve if you change URLs to a structure like test1.example.com and test2.example.com - this way you share at least the toplevel domain and might be able to do some cheaper single-sign-on (you can still do SSO with completely different domains)
You don't need to change the virtual host in Control Panel → Portal Setting for such requirement. Rather keep it to localhost. This will resolve both of your concerns.
Next you want to access portal using two different domain, you can do it through DNS settings. Map both to same IP (the IP of Liferay portal) and you will reach Liferay portal using any one. It will not change the url and will stay from the name initiated.

Resources