Funnel With nginx

I have an nginx server running locally, and I want to serve that using funnel, but I can’t seem to get the right serve configuration correctly. I’m trying to just allow any connection to 443 on the node.

so you want funnel → nginx → website?

im not sure if you can run nginx and funnel both on port 443.

you could run nginx only on port 80 and let funnel do the https magic.

first generate a cert

tailscale cert

than fire up the funnel

tailscale serve / proxy 80

that will funnel to

for nginx you could do something like

server {
  listen 80 default_server;
  listen [::]:80 default_server;
  root /var/www;
  index index.html;
  location / {
    try_files $uri $uri/ =404;

Thank you for the reply, I know I have the cert working because I am able to access nginx while in my tailnet via https. I will try something like only listening on 80 for nginx. But I can also allow tailscale to run the funnel on port 8443 or 10000 right? That wouldn’t conflict with nginx in that case.

yes, you can change the funnel port with

tailscale serve --serve-port 8443 / proxy 80

I will try this and report back. Thank you.

For all who find this result on google, I ended up proxying each path individually instead of using nginx. This seemed to solve my problem.