Web site not working on port redirection

Francis Daly francis at daoine.org
Mon May 13 22:37:26 UTC 2019

On Fri, May 10, 2019 at 12:31:43PM -0400, cox123456a wrote:

Hi there,

> Thanks for the detailed explanation. I agree with your diagnostic.

> I really need a way to bring 80 to 8000 and make it work.

Another way to approach this could be to change your code. It would make
it more efficient (avoiding one http redirect each time); but the real
reason to do it is to work around the particular nginx issue.

That is, where you currently have

class NavButton extends Component {
    handleModuleNav = action => {
        let to = "/" + action;
        window.location = to;

    render = () => {
        return (
          <div onClick={() => this.handleModuleNav("admin")}>
             GO TO ADMIN

the intention is to make a request for "/admin". You could change that
so that it make a request for "/admin/"; either by changing one line to be

        let to = "/" + action + "/";

or by changing another to be

          <div onClick={() => this.handleModuleNav("admin/")}>

Either of those changes would avoid nginx having to tell the client
to switch from /admin to /admin/. It would not fix the general case,
but that might not matter for your specific case.

Good luck with it,

Francis Daly        francis at daoine.org

More information about the nginx mailing list