Plone 4 Redirection - plone

I have 3 plone sites with diffrent name in a standalone plone 4(version) installation. When i hit www.localhost:8000/ its displays all list of Plone sites. I want that if some user type www.localhost:8000/ then he should automatically redirect to my first plone site say abc i.e. www.localhost:8000/ points to www.localhost:8000/abc. And if some user type www.localhost:8000/xyz then its get xyz site (i.e. another plone site on the same server). How can i acheive this. In previous version i get it through index_html but in plone 4 they remove index_html. So i need some help. I'm new to Plone.

First of all: commonly those tasks are not done directly from Zope. Please consider using Apache, Ngnix, IIS or whatever, as a reverse proxy running on port 80. Use rewrite rules to map URLs to Plone sites. Detailed instructions are available.
If your really don't want to use other HTTP server, you can use the Virtual Host Monster (virtual_hosting) in the ZMI root.

Related

Virtual Directory to WordPress blog

I have a website - www.domain.com - with Windows hosting. I don't want to install WordPress on Windows. Instead I want to get a WordPress blog on Linux hosting and create a virtual directory on my main server: www.domain.com/blog - which points to the WordPress blog. However, I can't find how to do this.
I have found documentation on how to create virtual directories in IIS 7.0, but this all seems to involve a directory on the same server.
Thanks, Jon
virtual directories are for running separate applications (different web roots, web.configs etc) on the same server as part of a single domain - so not what your looking for.
As Lex Li tersely pointed out, one option is you can use IIS as a proxy and rewrite the urls to some other host. IIS can modify the urls if nessersary so traffic appears to be served by your Windows server, when in fact IIS is making sneaky requests to the Linux blog behind the scenes and modifying the markup to ensure urls point to the Windows machine, and not the actual url which points to your linux box (your blog could be on any domain/subdomain/path and still appear to be part of yur site).
You could also use a CDN (cloudflare is free for the basic package...) and that allows you to setup rules so you can request content from different origin servers (ie your linux box) based on a prefix (/blog in your case), but all other traffic is sent to your Windows server.
Another option (not quiet what you asked for, but really simple to setup...) - if you can use a sub-domain instead of a prefix to the path (ie blog.domain.com/ instead of www.domain.com/blog) you can just point DNS for blog. to your linux host and www. to your IIS box - no configuration required to your Windows server.
Worth noting that its pretty much always a good idea to use a CDN infront of your web servers, its a layer of protection, makes your pages load faster etc etc etc (and it would work in front of either of the other 2 options suggested above)

Why does PHP/WordPress on IIS Express keep redirecting all requests to a different port?

I'm using Web Platform Installer and WebMatrix to set up a WordPress site running locally (Windows 7 Professional). It's the first time I've ever used WordPress and the first time I've ever used WebMatrix, so it's possible I'm missing something really basic.
Several times, I've had a problem where I hit 'Run' in WebMatrix. It opens the browser pointing to the correct URL - http://localhost:10268/ - thinks for a second or two, and then redirects to a different port - in this case, http://localhost:52925/ - which returns 'This web page is not available'
I have absolutely no idea where that second port is coming from, or why it's redirecting. I've searched the IIS Express config files (C:\Users\dylan.beattie\Documents\IISExpress) and the source code of my WordPress project, but can't find that port number 52925 anywhere.
Is this a built-in PHP / WordPress thing? Some sort of security feature, maybe? I'm completely stumped. One slightly odd detail - that may well be unrelated - is that I think this only happens after I start using revision control. The site will work fine when it's first created, but then when I open it from GitHub, things start going weird. Any ideas?
Solved it. It looks like there's a setting in WordPress that needs to match the IIS Express configuration - and when you check out a site via revision control or set up a new site from an existing folder in WebMatrix, it doesn't use the same IIS Express settings. In my case, I'd downloaded the code and restored the database from work I'd done earlier on a different machine, and so ended up with IIS listening on port 10268, but the WordPress site configured to listen on port 52925.
The IIS settings are in C:\Users\user.name\Documents\IISExpress\config\applicationhost.config, and the WordPress options are records in the wp_options table where option_name == 'siteurl' or 'home'
Two ways to fix it that I've found:
In WebMatrix, Site, Settings, change the site URL to wherever you're being redirected to.
Edit the wp_options table and change the settings to match the URL in WebMatrix/IISExpress.

Umbraco configured with IIS 7 having hard time with the site URL?

I am having a problem with my Umbraco installation on IIS. The site is working, apart from my home button. When I push the home button, the URL should be
http:/myserver.mysite
instead the URL is
http:/myserver
When I type in the link it serves me the home page but when I click on the Home button it wont and the scenario described above occurs.
I am using IIS 7 and Umbraco 6.1.1.
If you are able to get to the homepage with both hostnames but then clicking on the Home link takes you to the second host, the link in the page must be referencing the hostname directly. If this is the case, check your HTML to ensure that the hostname isn't present in the link - basic I know but you have to check.
If it isn't, contrary to what Eric Herlitz says in his answer, I would ensure that you don't have anything set in the hostnames options. I only use the hostnames option when I need to control the hostnames of multiple root nodes. Umbraco will automatically assume that the first node in the tree is the default site. In other words, if you have two sites at the root of your Umbraco instance but only one hostname bound in IIS, Umbraco will serve the first of the branches as the default site, unless as Eric Herlitz states, you have specified the hostnames for specific nodes.
Instead, I would use the settings in IIS to ensure that requests are routed to the correct hostname. I know using Eric's approach is possibly easier, but it would undoubtedly mean that users will still be able to reach and browse the site using both hostnames. Ultimately from an SEO perspective this is a bad thing. Personally, I would ensure that any requests to anything but your preferred hostname are redirected to you hostname whilst retaining the path. This can be done via IIS using the UrlRewrite 2 module.
If you don't have access to this, you can use MVC routing (see here for an explanation) or the UrlRewriting module that comes shipped with Umbraco. With the latter, settings are specified in the ~/config/UrlRewriting.config file and documentation can be found here: http://www.urlrewriting.net/149/en/home.html
I would personally recommend familiarising yourself with all these techniques as they can be quite powerful.
Did you set your hostname in Umbraco?
Right click on the site root in your solution and click "Culture and hostnames"
Fill out your hostnames and save

had to login twice for plone

I have set a plone product server with nginx + varnish + haproxy + 4 instance.(the buildout deploy configuration is come from the professional plone4 development book writted by Martin).
Now I have troubles with login process. I had to submit login info two times for signing in plone site.
I don't kown if nginx needs some settings like apache with mod_auth_ktk,or plone.session must adjust some parameters.
In fact , If I directly access instance using http://demo.com:8001/Plone address , it is OK.
Thanks.
There are potentially several causes of this problem, but the most common is a misconfiguration of the virtual hosting setup that causes some page resources to be served from a different URL than others.
View source on the browser, and look for differences in the URL between the page itself and the CSS/JS resources. If you find any, work on your virtual-hosting specifications.

How can I get two SSL certs to work on a two domain, shared IP configuration

I have two web site that are 99% similar. They share all of the same pages except the difference being that the logos change, a few of the links change, and the products that show up on either web site are flagged to show up on either or, or both. They use the same database.
I have written a utility method that essentially injects a where clause into any database access code I write throughout the app to determine which products to display depending on the current URL.
Problem: Website B gives the user a warning message that the site they are trying to go to is in fact Website A. I've read that the SSL cert needs a distinct IP.
Right now how I have everything set up is very clean on a maintenance perspective. I can update files in one place. Any suggestions on how to make the SSL behave, or am I looking at seperate IP's for the hosting(I really don't want to have to do this)?
If the latter, what do you suggest?
Site runs ASP.NET 4.0. Precompiled DLL.
UPDATE: Thanks to #GregS comment
If the sites share the same domain you can use a wildcard certificate
site1 - site1.somedomain.com
site2 - site2.somedomain.com
Otherwise you will need to get a UCC (United communications certificate) that will be for both domains.
You will need to configure IIS 7 from the command line because the GUI doesn't support setting different host headers for the same certificate. This tutorial shows how it can be done.
I setup another website in IIS that points to the same files as the first web site, got another SSL cert for the new site.

Resources