Nginx configuration file

 Nginx HTTP configuration file

server {

        listen 80;

        server_name www.penguintechnology.in;

        return 301 https://www.penguintechnology.in;

}

server {

        listen 80;

        server_name penguintechnology.in;

        return 301 https://www.penguintechnology.in;

}

 

Nginx HTTPS configuration file

server {
    listen              443 ssl;
    server_name www.penguintechnology.in penguintechnology.in;
    ssl_certificate     fullchain.crt;   # (Cert + bundle )
    ssl_certificate_key private.key;
    #...
}


Nginx Proxy configuration
server {
  listen 443;
  server_name www.penguintechnology.in penguintechnology.in;
  location /{
     proxy_pass http://localhost:3001;
  }
  ssl on;

    ssl_certificate /var/ssl/fullchain.crt; 
    ssl_certificate_key /var/ssl/private.key;
}


Ref page:
https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-http/
Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment