Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
3.3 kB
1
Indexable
Never
root@6a5579eac2fa:/# cd /home/adyl/kebek-frontend/client/build/
root@6a5579eac2fa:/home/adyl/kebek-frontend/client/build# ls -la
total 52
drwxrwxr-x 3 1001 1001 4096 Mar 11 08:11 .
drwxr-xr-x 3 root root 4096 Mar 11 09:23 ..
-rw-rw-r-- 1 1001 1001 3219 Mar 11 08:11 asset-manifest.json
-rw-rw-r-- 1 1001 1001 3870 Mar 11 08:10 favicon.ico
-rw-rw-r-- 1 1001 1001  644 Mar 11 08:11 index.html
-rw-rw-r-- 1 1001 1001 5347 Mar 11 08:10 logo192.png
-rw-rw-r-- 1 1001 1001 9664 Mar 11 08:10 logo512.png
-rw-rw-r-- 1 1001 1001  492 Mar 11 08:10 manifest.json
-rw-rw-r-- 1 1001 1001   67 Mar 11 08:10 robots.txt
drwxrwxr-x 5 1001 1001 4096 Mar 11 08:11 static
root@6a5579eac2fa:/home/adyl/kebek-frontend/client/build# cat /etc/nginx/conf.d/nginx.conf 
upstream kebek {
    server app:3000;
}

upstream nextjs {
    server landing:3000;
}

server {
    listen 80;
    server_name .kebek.kz;
    client_max_body_size 8M;

    access_log /var/log/nginx_access.log;
    error_log /var/log/nginx_error.log;

    location / {
        try_files $uri @proxy_ui;
    }

    location @proxy_ui {
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Url-Scheme $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://landing:3000;
    }

    location /CL/ {
        root /home/adyl/kebek-frontend/client/build/;
        index index.html index.htm;
        try_files $uri /index.html;
    }

    location /admin/ {
        include /etc/nginx/uwsgi_params;
        uwsgi_pass kebek;
    }

    location /api/ {
        include /etc/nginx/uwsgi_params;
        uwsgi_pass kebek;
    }

    location /pass/ {
        include /etc/nginx/uwsgi_params;
        uwsgi_pass kebek;
    }

    location /static/ {
        autoindex on;
        alias /static/;
    }

    location /media/ {
        autoindex on;
        alias /media/;
    }
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name .kebek.kz;
    client_max_body_size 8M;

    ssl_certificate "/etc/nginx/conf.d/ssl/kebek_kz.crt";
    ssl_certificate_key "/etc/nginx/conf.d/ssl/kebek_kz.key";
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000;";
    charset off;

    location / {
        try_files $uri @proxy_ui;
    }

    location @proxy_ui {
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Url-Scheme $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://landing:3000;
    }

    location /CL/ {
        root /home/adyl/kebek-frontend/client/build/;
        index index.html index.htm;
        try_files $uri /index.html;
    }

    location /admin/ {
        include /etc/nginx/uwsgi_params;
        uwsgi_pass kebek;
    }

    location /api/ {
        include /etc/nginx/uwsgi_params;
        uwsgi_pass kebek;
    }

    location /pass/ {
        include /etc/nginx/uwsgi_params;
        uwsgi_pass kebek;
    }

    location /static/ {
        autoindex on;
        alias /static/;
    }

    location /media/ {
        autoindex on;
        alias /media/;
    }
}
root@6a5579eac2fa:/home/adyl/kebek-frontend/client/build#