Hi everyone,
I’m interested to know what web server most of you use in production for Mediasoup projects.
In my setup I’m using Nginx as a reverse proxy in front of a Node.js application that uses Socket.IO.
I’d appreciate it if you could review the Nginx configuration below and let me know if it looks correct for a typical Mediasoup + Socket.IO server, or if there’s anything you would recommend changing or improving.
Here is the example configuration (domain changed to example.mediaserver.com):
server {
server_name example.mediaserver.com;
proxy_hide_header Server;
add_header Server "Ziture MediaServer" always;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_ssl_server_name on;
proxy_buffering off;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/example.mediaserver.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.mediaserver.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
if ($host = example.mediaserver.com) {
return 301 https://$host$request_uri;
}
server_name example.mediaserver.com;
listen 80;
return 404;
}
If you’re running Mediasoup in production, I’d love to hear:
-
Which web server or reverse proxy you are using (Nginx, Caddy, HAProxy, Traefik, etc.)
-
Whether this Nginx configuration fits best practices for Mediasoup + Socket.IO
-
Any important tweaks or improvements I should consider
Thanks in advance!