linuxgodigital-oceanbeego

Timeout errors with Beego on Digital Ocean server


I want to set up Beego on an Ubuntu server (without Nginx), but I cannot visit the site and having connection out time errors.

Can anyone check my steps if there is any mistake?

Here are my steps:

  1. I have used bee pack to pack my code.

  2. Then, use FileZilla to upload the package.

  3. After that, run tar -xvf beego_project.tar.gz to unpack.

  4. Run the project with nohup ./beego_project

The code is running correctly on localhost but why can't on remote server?


Solution

  • You're missing some critical steps.

    Check out the deployment guide on beego:

    https://beego.me/docs/deploy/

    First, you have to change the mode to production. Second, copy the files over to the server. Next run the application. Finally, serve the running application with Apache or Nginx.

    The two steps you're missing appear to be:

    1. change app mode to production
    2. serve the app with apache

    Check the link for more details. Important: If you're trying to access the app from a different computer (production deployment) then you need to ensure apache is serving it correctly.