DEV Community

Hisyam Johan
Hisyam Johan

Posted on

1 1

Configure Nginx on Ubuntu

Bismillah...

  1. Go to nginx configuration directory cd /etc/nginx/sites-enabled

  2. create and edit file vi myconfig

server {
    listen 443 ssl;
    ssl_certificate /etc/ssl/<server.name>.pem-chain; 
    ssl_certificate_key /etc/ssl/<server.name>.key;
    server_name <server.name>;
    access_log /var/log/nginx/nginx.vhost.access.log;
    error_log /var/log/nginx/nginx.vhost.error.log;
    location / {
        proxy_pass http://localhost:8080;
    }
 }
Enter fullscreen mode Exit fullscreen mode
  1. reload nginx sudo service nginx reload

Done.

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay