Giter VIP home page Giter VIP logo

Comments (1)

ganatan avatar ganatan commented on May 25, 2024

Hi thinhnd580,

I give you all the stuff

The nginx.conf below

Don't forget, if you like you star.

worker_processes auto;

events {
    worker_connections 768;
}

http {

    gzip on;
    gzip_http_version 1.1;
    gzip_comp_level 5;
    gzip_min_length 256;
    gzip_proxied any;
    gzip_vary on;
    gzip_types
    application/atom+xml
    application/javascript
    application/json
    application/rss+xml
    application/vnd.ms-fontobject
    application/x-font-ttf
    application/x-web-app-manifest+json
    application/xhtml+xml
    application/xml
    font/opentype
    image/svg+xml
    image/x-icon
    text/css
    text/plain
    text/x-component;

    sendfile on;

    server {
        if ($host = your_domain.com) {
            return 301 https://$host$request_uri;
            } 


            listen 80;
            server_name your_domain.com;
            return 301 https://www.your_domain.com$request_uri;


        }

        server {
            if ($host = www.your_domain.com) {
                return 301 https://$host$request_uri;
                } 


                listen 80;
                server_name www.your_domain.com;
                return 301 https://www.your_domain.com$request_uri;


            }

            server {
                if ($host = angular.your_domain.com) {
                    return 301 https://$host$request_uri;
                    } 


                    listen 80;
                    server_name angular.your_domain.com;
                    return 301 https://angular.your_domain.com$request_uri;


                }

                server {
                    listen 443 ssl http2;
                    listen [::]:443 ssl http2;
                    server_name www.your_domain.com;
                    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
                    ssl_ciphers HIGH:!aNULL:!MD5;
                    ssl_certificate /etc/letsencrypt/live/www.your_domain.com/fullchain.pem;
                    ssl_certificate_key /etc/letsencrypt/live/www.your_domain.com/privkey.pem;

                    location / {
                        proxy_pass http://127.0.0.1:4000;
                    }

                }

                server {
                    listen 443 ssl http2;
                    listen [::]:443 ssl http2;
                    server_name your_domain.com;
                    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
                    ssl_ciphers HIGH:!aNULL:!MD5;
                    ssl_certificate /etc/letsencrypt/live/your_domain.com-0001/fullchain.pem;
                    ssl_certificate_key /etc/letsencrypt/live/your_domain.com-0001/privkey.pem;

                    location / {
                        proxy_pass http://127.0.0.1:4000;
                    }

                }

                server {
                    listen 443 ssl http2;
                    listen [::]:443 ssl http2;
                    server_name angular.your_domain.com;
                    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
                    ssl_ciphers HIGH:!aNULL:!MD5;
                    ssl_certificate /etc/letsencrypt/live/angular.your_domain.com-0002/fullchain.pem; 
                    ssl_certificate_key /etc/letsencrypt/live/angular.your_domain.com-0002/privkey.pem;

                    location / {
                        proxy_pass http://127.0.0.1:4001;
                    }

                }

            }

from angular-app.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.