non standard ports

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
1/19/2005 4:10:11 PM
Gravatar
Total Posts 18439

non standard ports

mojoportal doesn't work correctly if you are using non-standard ports, that is other than 80 and 443

Luke Bradley pointed this out and I'm just noting it here so I won't forget to fix it for the next release. its an easy fix, I already know what the issue is.
1/24/2005 9:29:53 PM
Gravatar
Total Posts 20

A word of warning.

Joe, a word of warning regarding fixing this. I just configured MojoPortal on my remote server, and it works through an internal proxy in apache, which directs calls for .aspx files to XSP on another port. Because I had my proxy configured to route to http://localhost:8025/ (where XSP is) I noticed that all the links in Mojoportal linked to localhost, making me unable to access them... I reconfigured apache's internal proxy to point to domain name http://sittingfrog.com:8025/ and now it works fine...image files etc are  served with apache as they should be, and aspx files are served with XSP.

So it seems MojoPortal pulls the hostname from the HTTP request, but I wanted to mention that this could be a problem for me if you fix the port bug...All of mojos links would then go through XSP (on the other port) instead of Apache whcih is where they should go.

Can we override the host/port that Mojo makes everything link to? That would be the simplest solution (I can think of other cases where you would want to do this too)

Anyway, just some stuff that crossed my mind. Hope all is well.

2/20/2005 9:52:03 AM
Gravatar
Total Posts 18439

Re: non standard ports

I just implemented support for alternate ports. It doesn't matter what port the proxy runs on, just the final port it is served on is what would be reported by server variables.  I only had to make a small change in the SiteUtils.GetSiteRoot() method:

public static string GetSiteRoot()
        {
            string serverName = HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
            string serverPort = HttpContext.Current.Request.ServerVariables["SERVER_PORT"];
            string protocol = "http";
            if (HttpContext.Current.Request.ServerVariables["HTTPS"] == "on")
            {
                protocol += "s";
            }
            if (serverPort != "80")
            {
                serverName += ":" + serverPort;
            }
            return protocol + "://" + serverName + GetApplicationRoot();
        }
You must sign in to post in the forums. This thread is closed to new posts.