GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

✨ GOLF(2gg) ✨

okay bestie, welcome to the Golf docs, section Development β€” this one's filed under web-servers and it's giving "let me introduce your app to Nginx" πŸ’…


🌸 NAME 🌸

connect-nginx-tcp-socket β€” Golf documentation (web-servers)


πŸ¦‹ DESCRIPTION πŸ¦‹

So like. This page shows you how to connect your application β€” the one listening on TCP port <port number> (you started it with the -p option in mgrg, remember? 🫢) β€” to an Nginx web server.

Not me hyping you up for a two-step process, but here we are, and you're gonna slay it.

  • Step 1 πŸŽ€ : You will need to edit the Nginx configuration file. For Ubuntu and similar:
sudo vi /etc/nginx/sites-enabled/default

while on Fedora and other systems it might be at:

sudo vi /etc/nginx/nginx.conf

Add the following in the "server {}" section ("/<app path>" is the application path, see request):

location /<app path>/ { include /etc/nginx/fastcgi_params; fastcgi_pass  127.0.0.1:<port number>; }
  • Step 2 πŸ’– : Finally, restart Nginx:
sudo systemctl restart nginx
Note: you must not have any other URL resource that starts with "/<app path>/" (such as for example "/<app path>/something") as the web server will attempt to pass them as a reverse proxy request, and they will likely not work. If you need to, you can change the application path to be different from "/<app path>", see request. 😭 fr fr, don't skip this one.

πŸ‘‘ SEE ALSO πŸ‘‘

Web servers

  • connect-apache-tcp-socket
  • connect-apache-unix-socket
  • connect-haproxy-tcp-socket
  • connect-nginx-tcp-socket
  • connect-nginx-unix-socket

See all documentation ⭐


and that's the whole vibe, bestie β€” go forth and reverse-proxy responsibly πŸ§šπŸ’œ

this page came from version $VERSION, dated $DATE, and it lives in the GOLF(2gg) manual. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from