DEV Community

Hisyam Johan
Hisyam Johan

Posted on

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)