I have three different website.
can we run on a single instance in umbracocms.
how can i map three different website in single umbracocms and host on serv
You can, but that doesn't always mean that you should. If you want three different sites, you can have three root nodes, and set the hostname for each of the sites to the domain that you want to use. Once you've done that, just point the three domain names at your IIS website, and you should be good to go.
You'll need to make sure that you set all of the back office permissions properly if you don't want the users to be able to each of the sites. If the sites are all for the same client, and have common design, then hosting in one instance is probably OK. If they're all different and for different clients, it'll be much easier to manage them as separate Umbraco sites, IMHO.
First you need to setup the content tree in your Umbraco backoffice.
Create a home node for each website and setup the correct hostnames.
After that view this wiki page that explains what needs to be done at your server.
https://our.umbraco.org/wiki/how-tos/running-multiple-websites-on-one-umbraco-installation
Related
I would like your guidance on this.
I'm trying to build a website that has two "players" (which, I assume can be translated to "roles"?). One player is "consumer" and the second player is "supplier".
Both are interacting through mutual (sql server) database.
Now I would like to have totally separate systems each player, with totally different authentication mechanisms.
However, I would like to have the consumers system as sub-domain of the main domain, i.e., I would like to have the consumer system under 'mydomain.com', and the suppliers system under 'supplier.mydomain.com'.
However, I can't figure out how to technically do this? Can I create another web project in my solution, call it 'suppliers' and let it include all the features of the suppliers system?
Or should I create separate controllers for the suppliers features inside the main project?
The first option sounds most "clean" to me, however, how can I route the user from the main (the consumers) website to the suppliers website based on the subdomain?
If I choose the second option, how can I make sure that user which authenticated as customer will not be able to perform as supplier?
This is probably very common task to do, any good tutorial or example for this?
You will create two separate IIS applications - one for your consumers and another for your suppliers.
You will then set the host headers on each to your required domain and subdomain. IIS will then take care of routing URLs to your separate applications. Instructions for setting IIS host headers here https://technet.microsoft.com/en-us/library/cc753195.aspx
As for managing application code, given you want complete separation I would suggest creating three Visual Studio projects:
Web application for consumers
Web application for suppliers
Class library of shared code - database logic etc
You are then able to develop and deploy each web application independently.
In terms of tutorials, there is quite a lot available, here are a few which will help you:
https://web.archive.org/web/20211020150710/https://www.4guysfromrolla.com/articles/122403-1.aspx
https://www.simple-talk.com/dotnet/.net-framework/partitioning-your-code-base-through-.net-assemblies-and-visual-studio-projects/
https://softwareengineering.stackexchange.com/questions/207101/managing-multiple-projects-that-share-code-customization
for this problem, so use "Area" =
https://msdn.microsoft.com/pt-br/library/ee671793(v=vs.100).aspx
I'm creating a website for a company which has 3 different firms. The domain hence will have 3 sub-domains like this:
www.example.com
firm1.example.com <-> www.example.com/firm1
firm2.example.com <-> www.example.com/firm2
firm3.example.com <-> www.example.com/firm3
The firms will not share code between each other. Each firm has its own db hosted on the same server. Each firm will have a link to main page ie, www.example.com.
I decided to create one module for each firm and a main module which will be called from main.dart. Now how and when do I call the second module. While doing so, I'm not understanding the necessity of having a module over controller.
Is this right to modularize the app in this scenario?
What are the advantages of having multiple modules?
Should we use one router for each module? The reason I ask this is that in the future if I plan to remove firm3 and put it in a separate domain which will no longer be sticking to the main application, then I will have to remove the corresponding routes from the router which is unlikely for a modularized app.
A module is for combining a group of type registrations for the injector. Usually you also have several modules even when you have only one company.
Have a look at this example: https://github.com/akserg/angular.dart.ui/blob/master/lib/carousel/carousel.dart
This is a Carousel component which consists of two components which are always used together and which depends on the TransitionModule.
The CarouselModule allows you to register all those types with just install(new CarouselModule);
A module has nothing to do with program logic, it is more for registering a group of Angular components, directives, services, ... at once.
A controller is all about program logic.
What are the differences between these three companies?
You could create three different apps and move the code you want to reuse between these apps in a package and import this package from these three apps.
Update
If the 3 apps share no code it doesn't make any sense to put them in one application.
You can use virtual directories functionality of the web server you are using.
What you get is a dependency between applications that have otherwise nothing in common (besides being served from the same server).
You have to cope with code size. Each user loads the code for 3 apps even though he wants and can only use 1/3 of this.
In Dart it is not so easy to load code on demand (at least not yet).
Summary: Your approach has no advantage and serius disadvantages. Create three independent apps instead.
Modules are not the same thing as Controllers. A module holds all of the parts of your application. That includes Controllers, Services, Directives, etc. A Controller is only one thing that belongs to a Module. A Module not only holds parts of your application, but it also allows each of the pieces to find each other. Modules are the basis of dependency injection.
So you have 3 different firms within a single company. Are those firms apart of the same domain? Are they separate websites or a single website? If each firm has their own domain or separate websites you will have no choice but to separate them into separate angular apps. A single page application cannot span multiple domains.
If you are defining routers per module then you're looking having separate applications. You can define 3 separate modules and import them into a Main application, but the Main application would define the router. I'm not entirely sure you can have multiple routers per app in separate modules. I can't find any examples of that. In theory maybe, but it seems like it would be difficult to maintain.
But only given what we know it's hard to make any more recommendations because how the 3 firms interact isn't really known. Will they share code? Do they have to be all in a single page application or can you split them into separate html pages each with their own angular app?
Updated:
So I would separate each firm into their own App with their own router. I would make them each a separate single page app. You can choose to share code or not. My application consists of multiple single page apps and I share code between them. Here is how I do it:
var RegistrationApp = angular.module("RegistrationApp", ["ngResource",'ui.bootstrap',"ngRoute", "ngAnimate"]);
var App = RegistrationApp;
Then in any other type of thing I define I use the global variable App like so:
App.factory("RegistrationService", function($http) {
By having the global variable App defined in all of my applications that I build I can share code simply by including those components in with the app the client is loading and it'll pull in that code into that App's module.
Login will be something the server side does and it will drop a cookie on your browser so each app technically could use that authentication provided the cooke maps to the domain. If you have separate URLs for each firm (ie firm1.company.com, firm2.company.com, firm3.company.com) you have to be careful how that cookie is defined because by default if you login under say www.company.com that cookie will not be seen by firm1,firm2,firm3 because those are different domains. You'll have to set a cookie for .company.com so subdomains can see it. But if you do it right login won't require communication between firms/Apps.
I think the easiest would be to manage that at webserver level.
If I understood well, you have 4 independent sites:
www.example.com
firm1.example.com
firm2.example.com
firm3.example.com
I you are using Apache, that would mean different 4 virtual hosts. Then, you just need to redirect www.example.com/firmN to firmN.example.com using, for instance, .htaccess.
Alseo, security-wise, this method allows to have the data of each company in a separate container, if once you have an attack in one site, you don't want the attacker to have access to all the other sites.
I am relatively new to umbraco and have just got the site build but the clients request for a microsite with a completely new look and feel.
So how do I set up a new microsite in umbraco.
Please Help.
Thanks a ton
To give pages within Umbraco a completely different look and feel from the others, there's a few different ways you can go. Obviously there's more than one way to solve a problem, but I'll just mention a few that I can think of and explain how they'd work.
Create a new master page template that has your new design, then create child templates for each document type, to include a home page, a standard text page and anything else you may need. Assign these templates to the document types that will use them.
Pros: Easiest approach. Allows most flexibility in design.
Cons: The user can choose the wrong template or forget to set the right template.
Create separate templates as in option 1, but also create separate document types. Assign the templates only to the new document types. Each document type can extend your existing ones to inherit the same properties or you can create entirely new ones.
Pros: Ensures that the uses uses the correct template all the time. Allows most flexibility in design. Allows site specific customization - can add or remove properties.
Cons: The number of document types doubles and therefore the amount that appears for the user to select. Of course the number that they see can be limited by what templates they are allowed to create.
Use existing templates, but include a check that determines which site is being visited, depending on the path or subdomain, etc., then dynamically load different style sheets.
Pros: You do not need to create separate templates or document types for the microsite.
Cons: Your master template's markup will have to be generic enough to compensate for both designs, therefore it isn't as flexible.
Once you choose an option for how you will structure and style the pages of the microsite (and remember that my list is not conclusive), you will need to determine where to setup the node structure. The best option here, if the microsite will be subdomain or if it has its own domain, would be to add it as a separate home node first and then add all of its own pages below it. Then you can actually setup a different host reference for the site within Umbraco. There have been a few answers on SO that mention how to do that:
Assigning hostnames in umbraco
Publishing multiple sites on a single instance of umbraco
Here are some basic steps to allow Umbraco to use other domain names:
Setup your web server to accept host headers for the specific domain/subdomain. In IIS 7.5, this can be done by adding bindings for the domain/subdomain.
The new node needs to be a direct child of the Content node.
Right-click the node and choose "Manage hostnames". Then add the domain/subdomain URL.
Hope that helps! Feel free to ask more questions.
So I am creating a web app, that will give each registered user a unique 'workspace'. This workspace should be accessible by anybody they give permission to.
I have the main domain for my marketing website, but I am trying to figure out how to manage the nitty-gritty domain management of the web app itself.
Should I buy generic domains that I then use to allow the users to chose one of them for their workspace, and create a unique subdomain there, or how should I approach this?
My web app is written in Rails.
The term Domain has a few meanings - I assume you mean "Domain" as in the hostname in a Domain Name or URL, also known as the "third-level domain name" (e.g: www.mysite.com - where mysite.com is the hostname).
I am trying to figure out how to
manage the nitty-gritty domain
management of the web app itself
I've usd 4th level domains before (also known as local hostnames, e.g: images.mysite.com, admin.mysite.com), but these were provisied via a helpdesk at the telco who managed the A-Records for our domain name, so it wasn't a quick and easy automated process.
I've also seen hosting firms provide web-based tools that allwo you to do this yourself - where they manage the A-Record.
In both cases management of the 4th level domains is performed manually. I haven't hread of anyone automating this within an app the have developed - it's obviously possible but definately non-trival.
Should I buy generic domains that I
then use to allow the users to chose
one of them for their workspace, and
create a unique subdomain there, or
how should I approach this?
It depends. Even if you host the application there's no reason why the client can't set-up a 4th level domain that points at your server and not their own; this would mean that your app would need to lookout for the 4th level domain only as there's no guaratee they'll be using a 3rd level domain your app "knows about".
Say John Brown from 'Studio ABC' signs
up at mysite.com, what should I do?
Give them studioabc.mysite.com or
mysite.com/studioabc
It depends on what you want to achieve and what over-heads your comfortable with:
The "mysite.com/studioabc" option should be easy to auto-provision through your app, so in some ways that'd be easier to work with.
A problem with the "mysite.com/studioabc" option is that (depending on how much control you have over the web server) all your files (from all clients) will be in the same place - that will make it more complex to manage (back-ups, etc).
The "studioabc.mysite.com" is going to be harder and slower to provision (as DNS changes are required), but you have the advantage in that you can run them as seperate sites if you want to. For example, if "thebeatles.mysite.com" takes off you'd be able to move it to a different physcial web server that had better performance, but you can't move "mysite.com/thebeatles" so easily.
In both cases your app will be a Multi-tenanted one (except in cases such as studioXXX.mysite.com where the site is hosted elsewhere); data access becomes an issue - keeping the clients data separate. There's different approaches you can take for this, see this article on Multi-Tenant Data Architecture. (BTW - I know it's an MS article and you're working in Rails! - but it's an excellent article which will be helpful).
Buying a generic name is, well, generic. If you wanted to foster a community of clients around a particular thing then get a domain name that makes sense for that; if you use your own domain name it would in-effect be a form of advertising.
And rather than it being mysite.com,
should it be obscuredomain.com that
the actual web app resides at and
therefore gives the subdomains of,
because mysite.com is the marketing
site.
I think either will work - the question is what do you think you're clients would prefer? How does that stack up with your business model? The domain name is an important part of any online presence (from a marketing side) as it helps define the identity of the site and those who use it - so choose carefully.
Do you ever want to sell this off? If you do you'd want to build it on a domain name that you were happy to sell with it. So with that in mind I'd have a domain name for your product / service and a seperate one for your business - assuming that you'd one day want to sell the site but not your business. Alternatively, if the website is the business and you're happy to sell them as a whole package then I'd put it all under the same domain name.
Finally, you might have more than one domain, each providing a different level of service (and each could have 4th level domains hanging off it instead of www):
www.mysite.com
www.mysitepremium.com
www.mysitecheapskate.com
We are using MVC on IIS6. Our site is currently being opened up, but we need to restrict access to the register part of the site, but allow those who can register (i.e. from within our offices) still to sign in and use the site fully.
So inside office can access register and all other site.
Outside office cannot access register and but can access all other site.
Initially, we put file restrictions for the IPs of our offices on the register.aspx file in the views\accounts folder. We were pretty sure this was working, but today, we discover it isn't! Which thinking about it actually makes sense!
So is this possible?
We need to have the other aspx pages in the views\accounts folder usable as views whilst only blocking the register view.
Hope this makes sense!
Neil
Urls defined with ASP.NET MVC are configurable and not based on the folder or file where view page resides.
This means that you cannot use IIS to configure the access for this view pages.
You can filter access to the controllers (and so indirectly the view pages that are called by the view pages). This is done with Action Filtering. On how to create a custom action filter see this page.
So yes, it is possible to limit access to certain pages depending on the ip-address.
I have come across this kind of situation before, but the problem was solved by the way we write applications.
Whenever we've had an application with "some information displayed" and "a way to administer the data" we've always created separate UI projects over the top of the business logic. This isn't just to help with maintainability, it also means that the public bit can be deployed on a public website, while the admin bit can be accessed over the network - so there is no external access at all.
In your example, extracting out the two logical elements would mean that you can deploy two separate web projects with different access rules in IIS.
Another option would be to check the IP address in the executed code for the restricted page - IP addresses can be spoofed, so it's not a completely secure solution.