Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Magnus Bolling 10 posts 90 karma points
    Mar 29, 2017 @ 08:27
    Magnus Bolling
    0

    Flexible load balancing - 404 on preview

    Hi,

    I've set up a load balanced environment with 3 servers (1 source and 2 targets). I'm on version 7.3.8 and I use the flexible load balancing with option 2 (file replication) found here: https://our.umbraco.org/documentation/getting-started/setup/server-setup/load-balancing/flexible.

    Everything works great and the Umbraco administration (/umbraco) is only accessible from the source server. I've got one strange issue though, if I try to preview an UNPUBLISHED page from within the administration I'm redirected to my custom "404 page not found" page. Any ideas why? We know for sure that this worked before we load balanced the site.

    Thanks, Magnus.

  • Magnus Bolling 10 posts 90 karma points
    Apr 26, 2017 @ 11:52
    Magnus Bolling
    0

    Hi again,

    After a closer look at this issue it seems like the following file (at line 37) : https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/Preview.aspx.cs redirects to the website root on preview.

    Umbraco administration is not load balanced. But when you click on preview on an unpublished page the request goes to myserver.com/xxxx.aspx which is a URL that hit the load balancer. If you're "unlucky" the request goes to one of the front servers. This preview page doesen't exist here so the preview page automatically redirects to the 404 page.

  • Magnus Bolling 10 posts 90 karma points
    Aug 07, 2017 @ 14:22
    Magnus Bolling
    0

    Hi,

    After some more research I can now confirm my theory in previous post: The preview is hitting the load balancer if you're unlucky. In my case 1 out of 3 requests. Don't know if this is a bug or how it can be changed in core?

    Anyway, I've fixed it by adding a regular expression in my load balancer so it don't load balance any request with only an ID (int) followed by .aspx. For example: http://yourdomain.com/xxxx.aspx.

    Hope someone found this useful :)

    / Magnus

Please Sign in or register to post replies

Write your reply to:

Draft