Sitecore Config files for MultiSite Solution - sitecore

We have a MultiSite solution using Sitecore 7.1 .
I want to use custom config files for different Sites. For example i have a different CustomLink Provider for Sites , Different 404 pages , Different Language Resolver .
How should i add or patch these config files and in what order ????
Any help

You can't have a different web.config for each site but there are techniques you can apply to make things easier:
I've written some blog posts that address just this topic:
A Switching Link Provider in Sitecore
Create Site Specific
Pipeline Processors for Sitecore
Here are some others that you may find useful:
Site-Specific Providers
Sitecore Pipeline Enabled LinkProvider
Sitecore - Multiple-Site Error Page Handling

If you do want to do this with configuration files you would have to set up multiple content delivery sites. You would then deploy different configuration files to the different environments so that they would use your custom code and configurations. Each website 'site' definition would be pointed to a different root in the common Sitecore database.
This would require a scaled model with multiple licenses. If that's not possible, I recommend going with #TwentyGotoTen's approach for supporting the multi-site within a single website.

Related

Can hosted GitHub Pages websites accept file uploads?

I would like to create a simple website that accepts a text file upload for a small project that parses the text. Is this possible to do with GitHub Pages? I haven't found anything that addresses this functionality so I am wondering if it is possible or not.
As seen in this issue, there is no server side configuration or execution with GitHub Pages, so no.
The only workaround is rafrex/spa-github-pages: Single Page Apps for GitHub Pages, a lightweight solution for deploying single page apps with GitHub Pages. You can easily deploy a React single page app with React Router <BrowserRouter />.
But that might not include what you are looking for.

Subdomain hosting with Django + Nginx +Gunicorn

I am developing a web app using django for server-side. It has clients in android, ios and frontend. I was thinking of using subdomains for differentiating the urls of these clients. The differentiation is due to the fact that responses to urls are different for different clients.
I was hoping of being able to do using subdomains like android.example.com, ios.example.com...etc. My subdomains are fixed.
Can you help regarding what approach I should take to achieve this. Some options I have read are
Hosting two different project with same database.(Looks quite good for me, but may not be the optimum)
Hosting on same instance using sites framework.(Not sure as to how good this option is)
Hosting using virtual-host(Really Not able to understand how to achieve this).
Using a Sub-domain Middleware, as mentioned in many of answers and also in some Django Snippets.
Please help me with the best option and if possible with links to some tutorials as to how to achieve it. Thanks.
"Using the sites framework" is somehow the same as hosting two projects with the same database. If you would use the sites framework you would have seperate instances for each subdomain which share the same code base and data base, but have to differ in one setting in the first place, which is SITE_ID.
If you're able to run multiple instances this for sure has some advantages:
You don't need additional processing via a middleware
You can easily choose different settings for each site, eg. different template paths, use different middleware etc, even customize urls per project if necessary
You're doing already some kind of load-balancing, as you're directing requests to seperate instances, also if one site crashes it shouldn't affect the others
If you can only run one instance I guess your only choice is using something like a middleware, eg. django-mobile then is maybe something to look in as it offers you some good toolset for determining the type of client etc...
But besides that note that it might not always be the best practice to have seperate domains with the same content when it comes to SEO.

Sitecore Basics

I am quite new to Sitecore WCM and have been doing a lot of research and readings. Could someone please help me to clarify the following
basics of Sitecore?
I've a number of ASP.net web applications. If I convert the project to Sitecore project will it just work magically?
If I want to create new site, do I need to manually create a new site in IIS or Sitecore does it when I publish?
Are there any online training videos available, could not find a single (except Sitecore marketing demo).
If we have MVC and Web forms applications, is it possible to migrate to Sitecore?
First off, welcome to Sitecore!
Regarding your questions:
I've a number of ASP.net web application. If I convert the project to Sitecore project will it just work magically?
A Sitecore website is an asp.net web application. It just happens to start off with databases, DLLs, and web.config entries that are ready for you to get the CMS up and running. Standard .NET code works just as normal. However, part of what happens when you first setup your site as a Sitecore website is that Sitecore starts intercepting requests for pages and attempts to bind them to pages in the content tree. If a content item doesn't exist with the matching path, it won't return.
This is particularly important if you plan on just standing up your existing pages alongside new Sitecore pages. Your URLs won't initially work, and you'll have to do some configuration to get them to resolve and be ignored by Sitecore.
However, if you do NOT want to put your pages alongside the site and instead integrate them into the Sitecore solution as content items, you'll likely need to re-architect your solution. Sitecore uses 'sublayouts' (ASCX) for different components on a page, and these need to be represented in the database and the code base, and then added to content items as part of their presentation details. This can be easy, if your site is already heavily architected towards components, but sometimes you'll need to create a bunch of ASCX to represent your different pages.
Your business logic should not be affected, unless you decide to make changes to start leveraging configurations in the Sitecore database or accessing properties of the current context item. In this manner, your code should execute "out-of-the-box".
If I want to create new site do I need to manually create a new site in IIS or Sitecore does it when I publish?
Sitecore doesn't "create" anything when it publishes. Publishing is really just an action of taking the content approved in the Master database and pushing it out to the Web database for the selected target. Your IIS sites, and anything else you need for your application, you just setup as you normally would.
Are there any online training videos available, could not find a single (except Sitecore marketing demo).
I highly recommend taking the developer training that Sitecore provides. It's a very good introduction to the concepts, especially if you aren't working with folks who have a lot of Sitecore expertise. It also allows you to meet some other folks who are getting into Sitecore and you can help each other out.
If we have MVC and Web forms applications, is it possible to migrate to Sitecore?
Sitecore is a .NET application at its core, and web forms work. MVC is also supported with the most recent versions of Sitecore.
I know this question is a little old, and already answered, but I think I have some info to add.
I've a number of ASP.net web application. If I convert the project to Sitecore project will it just work magically?
Nothing is magic. If you want the content management or marketing aspects of Sitecore, plan on rebuilding your site(s) within Sitecore.
If I want to create new site do I need to manually create a new site in IIS or Sitecore does it when I publish?
Sitecore is an IIS site. When you install Sitecore, it creates an IIS site along with at least 3 databases (core, master, & web). Sitecore can have multiple subsites, but they're all built within the single IIS site that is Sitecore.
Are there any online training videos available, could not find a single (except sitecore marketing demo).
These videos may not have existed when this question was originally answered...so here's a few I found useful.
Sitecore Training: Developer Fundamental Series - Creating Visual Studio Project for Sitecore
Sitecore MVC - Getting Started (Part 1)
Sitecore MVC -- View Renderings, #Html().Sitecore, and Models
If we have MVC and Web forms applications, is it possible to migrate to site core?
Webforms and MVC are both supported in Sitecore. You will be thinking of both of them in a different way whenever you are rebuilding them in Sitecore though.
1) You can create blank solution and add existing items like sublayout, css , javascript etc and obviously need to change some codebehind. But sitecore has different database structure compared to normal web applications , so you will need to create template, items etc.
2) For sitecore , you will need to create website in IIS and make entry in your host file as follows:
local path C:\Windows\System32\drivers\etc find hosts file and in that file add entry as
127.0.0.1 yoursitename.com
3) For demo video you can try Sitecore channel videos for basic sitecore learning from Youtube.

Multiple domains with shared codebase but different data using Django

What I'm trying to do is best explained by looking how wordpress.com works:
each blog is assigned to a new subdomain, but users can use their own domain as well. Custom domains could be assigned using a simple web interface
each blog has its own contents, theme, etc
all blogs share the same codebase
Is it possible to do the same thing in Django?
I'm not interested in implementing subdomains, but I want the other features.
It is important to me to find a way that domains don't have to be hardcoded in a configuration file in order to work. The dynamic nature of domain assignment makes managing large number of domains possible. It would be ideal if domain matching could be done against a database table.
I use nginx and uwsgi.
Yes but it will require more work in Django compared to out-of-the box Wordpress install but will offer you more flexibility.
You might want to take a look at django sites. However I don't think it will be able to do everything you are trying to do.
A more modular system would be for you to write a script which when invoked will bootstrap a new db schema, new virtuelenv, install all necessary things into it, add a site config for the new site to nginx/apache and then restart the nginx/apache. The code can be from the same directories, except since each site will run on it's own virtualenv, it will be much more secure, reliable and fault tolerant. This however as you can see will require some work but I depending on your requirements, it is the most flexible way.

Suggestion for Approachs to Develop Multi tenant Django Proj on Google App Engine

I was hoping to get some suggestions on some best approaches to develop a multi tenant Django project on Google AppEngine.
Some Thoughts to Consider.
I would assume using djnago.contrib.sites is a must.
I would like to use existing applications such as django-profiles and django-registration, I know their models would need porting.
Can multiple domains be pointed to the GAE App and the site be automatically chosen from the request headers?
IF not multiple domains, is there a way to say take a request say to www.example.com/tenantA/login and www.example.com/tenantB/login and push them to one view but with knowledge tennant without changing all the views, maybe using custom managers to hide the complexity from the views.
Generally hoping this will be a discussion of any approaches you have taken in the past or plan to take.
Looking forward to any Comments/Answers.
Regards
Mark
I can answer the App Engine questions for you, though I don't know the Django ones:
Yes, anyone can point a domain to your app using Google Apps, with the 'add services' option, entering your App ID when prompted. You can then check the 'Host' header to determine what site you want to use.
You can hide information per-tenant by using hooks to automatically insert the host in entities and queries: http://code.google.com/appengine/articles/hooks.html
Today Google released SDK 1.3.6, which includes multi-tenancy baked right into the solution.
http://googleappengine.blogspot.com/2010/08/multi-tenancy-support-high-performance_17.html