Skip to content

Setting up Nginx #73

@LebedevIV

Description

@LebedevIV

The AceBase server, when installed on a remote server, created a config for nginx:
server { listen 80; listen [::]:80; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }

... which listens on port 80, therefore, external requests from a browser with the specified port http://server_address:3000 are not redirected to the server's local services - the port will have to be removed so that the address http://server_address remains - only then it will be redirected to nginx to internal 3000 port. In addition, calls to the server AceBaseClient('95.140.158.78', 3000, 'server', false) also caused errors.
I added in the config another server to listen on the port 3000 :
server { listen 3000; location / { proxy_pass http://localhost; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
Now you can access from the browser with the port http://server_address:3000, and without the port http://server_address.

Correct me if I did something wrong, and is nginx even needed? In this manual, I did not find the environment setting for remote hosting of the AceBase server anywhere.

I'm not a very educated person - I'm trying to replace FireBase Realtime with AceBase. I would be very grateful if for people like me to slightly lower the entry threshold with slightly more detailed step-by-step instructions, it is better to use a through example of installation, for example, on Ubuntu with Node.js . I think AseBase will become very popular with the threshold of entry close to FireBase Realtime.

Many thanks and best wishes!

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