Nginx Issue

General Discussion
  • So, my sites live, and I've transferred everything over, site is available on

    However the old address was

    So I need to redirect both forum to root, and www to non www. I've got this in my server block, but it's saying page not found.

    server {
        listen 80;
        rewrite     ^ $scheme://$request_uri? permanent;

    But I'm pretty lost. 😆 Nothing I change works.

    If anyone could do me a solid and help me work this out, I'd be eternally grateful. 😆

  • Paging resident nginx expert, @julian

  • @psychobunny I'm hoping going into DNS in Digital OCean and creating another record for will help. The funny thing is, my iPad is still showing my old website.

  • This might help you

  • I don't know enough about nginx internals to be confident enough to write a single server block to do both of those, but try this:

    server {
            listen 80;
            return 302$request_uri;

    And possible for the /forum redirect...

    location ^~ /forum(.*) {
        return 302 $scheme://$http_host/$1$is_args$query_string;

    YMMV? 😄

    When it starts working, switch those 302s to 301s. Then Google will know to transfer requests from one to the other.

  • @julian I think the issue could be further back than this, as gets server not found, not the nginx landing page...


    I've created a record in Digital OCean for it, but it's made no difference, so not sure where to go from here. I can't think of anything else at this point. exists and works, I've got that bit, but how on earth can not exist. 😆

    Ahh, no wait, I might have it. Just a moment. 😆 I've set up a CNAME record for www in

    That according to google, should work.

    EDIT: Do you ever get that feeling, when you've worked so long on something, and it finally works, you're not sure if you're imaginging it. I'm having one of those moments.

    The /forum/ redirect didn't work, but, quite frankly. I'm not even remotely bothered about it. 😆

Suggested Topics

  • 0 Votes
    11 Posts
  • 0 Votes
    1 Posts
  • 0 Votes
    6 Posts
  • Issues with 0.5.1

    General Discussion
    0 Votes
    12 Posts
  • 0 Votes
    24 Posts