0

I was trying to run my beego in google compute engine instances. I have it running on port 8080. But when I tried to change it to port 80, it will have an ListenAndServe Permission denied error. What shall I do to make it run on port 80. Also can I serve the beego project using Apache2 so that I can run the project without doing bee run?

lkb
  • 11
  • 1
  • possible duplicate of [Socket programing Permission denied](http://stackoverflow.com/questions/20396820/socket-programing-permission-denied) – dyoo Jan 23 '15 at 19:56

1 Answers1

1

Ports under 1024 are privileged, so you need root access to run a process that listens on any of them.

For your second question: you can use apache or any other reverse proxy to host your application. This basically means that you run two separate processes (one for apache and one for your application). Apache listens on port 80 and forwards the request that are meant for your application. It is quite easy to set up a the reverse proxy for your vhost.

tmichel
  • 954
  • 7
  • 7