Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi, We have hosted the Nodejs application using nginx as webserver with digicert ssl mapped to it.
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug;
add_header Set-Cookie "HttpOnly; Secure";
add_header X-Frame-Options "SAMEORIGIN";
gzip off;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
server
{
listen 80;
server_name mydomain.com www.mydomain.com;
return 301 https://$host$request_uri;
}
server {
large_client_header_buffers 4 16k;
listen 443 ssl;
server_name mydomain.com www.mydomain.com;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
ssl_certificate /etc/ssl/certs/bundle.crt;
ssl_certificate_key /etc/ssl/certs/www_mydomain_com.key;
ssl_prefer_server_ciphers on;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass https://www.mydomain.com:8080;
}
location ~ ^/(room|socket\.io) {
proxy_pass https://www.mydomain.com:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass_request_headers on;
}
location /wsapp {
proxy_pass https://www.mydomain.com:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_hide_header 'Access-Control-Allow-Origin';
}
}
const server = require('https').createServer(credentials, app).listen(8080, 'www.mydoamin.com');
const io = require('socket.io')(server,
{
cors: {
origin: ["https://www.mydomain.com:*"],
methods: ["GET", "POST"],
transports: ['websocket', 'polling'],
autoConnect: true,
pingInterval: 25000,
pingTimeout: 180000,
},
allowEIO3: true,
cookie: {
name: "domainio",
httpOnly: false,
secure: true
}
});
var socket = io.connect('https://www.mydomain.com',
{
'transports': ['polling'],
'autoConnect': true,
'pingInterval': 25000, // default - 25000
'pingTimeout': 180000, // default - 60000
'reconnection': true,
'reconnectionDelay': 1000,
'reconnectionDelayMax': 5000,
'reconnectionAttempts': 5,
'secure': true
});
jeffs
0621335d663b4b699a60eb27e28153
accesstrax
Dwight Trumbower
admin
yimprogramming
samunyi90
1d6ce141ab5444dfb1ea2dd29cf4b1
Matt Fricker
joel9b158e40551b15093f213f
EmilJacobs