Configure Nginx on Ubuntu

nhisyamj

Hisyam Johan

Posted on September 3, 2022

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.

đź’– đź’Ş đź™… đźš©
nhisyamj
Hisyam Johan

Posted on September 3, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related