Skip to content

NGINX not redirecting #6

@AliaMYH

Description

@AliaMYH

Hi I'm trying to do the final step, which is the redirecting.

I've done the NGINX configuration:

server {
listen 8080 default_server;
listen [::]:8080 default_server;
server_name localhost;
#charset koi8-r;

    #access_log  logs/host.access.log  main;

   location / {
        root   html;
        index  index.html index.htm;
    }
    location ~* "^/[0-9a-z@]{5,15}$"  {
            rewrite ^/(.*)$ http://localhost:7000/api/item/$1 redirect;
    }

But the error I get in the browser is :
This site can’t be reached localhost refused to connect.

On Postman it's :

Could not get any response
There was an error connecting to http://localhost/kRKAtUi3r.

Any ideas what's wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions