Can you please help with rollout on on-premise env configs are following:

App config:
env: dev
enable_workers: true
instance_id: 9sMWy5NGR
app:
id: 0
project_id: 0
app_id: “”
token:
build: 1
built_at: 0001-01-01T00:00:00Z
send_critical_errors: false
send_critical_error_addr:
push_notifications_addr:
job_id:
server:
port: “9895”
api_base_path: api
api_addr: 127.0.0.1
db:
network: tcp
host: host
port: “5432”
name: test
user: postgres
password: soome password
log_queries: true
pool_size: 100
per_page_max: 0

log:
level: debug
folder: logs
format: simple
log_to_file: false
swagger:
path: api/_swagger
cache:
cleanup_interval: 0
fs_size_cache_period: 0
db_record_count_cache_period: 0
db_size_cache_period: 0
metrics:
enable: false
server_addr:
send_interval: 60
auth_token:
cache_period: 0
second_to_start: 17
sql:
enable: false
cache_period: 0
storage:
driver: fs
fs:
path: /files

scheduler_off: false
modules_settings:
auth_v1:
auth_cookie_name: “”
confirmation_code_expiration: “30”
confirmation_code_max_attempts: “5”
confirmation_required: “false”
failed_login_delay: “0”
force_session_signature: “false”
recovery_code_expiration: “30”
recovery_code_max_attempts: “5”
request_replay_protection: “true”
session_duration: “60”
timestamp_max_skew: “15”
token_options: “1”
verify_host_schema: “false”

allow_cli_bp: false

nginx:
server {
listen *:443 ssl;
server_name myvipsolutions.com;

SSL configuration

ssl_certificate /etc/letsencrypt/live/myvipsolutions.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/myvipsolutions.com/privkey.pem;

Set HSTS to 365 days

add_header Strict-Transport-Security ‘max-age=31536000; includeSubDomains; preload’ always;

client_max_body_size 128M;

proxy_set_header HOST $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_http_version 1.1;

Backend routes

location /api/ {
proxy_pass http://127.0.0.1:9895;
}

Web v4

location /prefix/ {
alias /home/dev/;
index index.html;
try_files $uri $uri/ index.html /index.html =404;
}

Mobile apps v3

location /api/v3/mobile/ {
alias //;
}

Mobile apps v4

location /api/v4/mobile/ {
alias //;
}
}

server {
if ($host = myvipsolutions.com) {
return 301 https://$host$request_uri;
} # managed by Certbot

    listen 80;
    server_name myvipsolutions.com;
return 404; # managed by Certbot

}

получаю 404 ошибку

Web application prefix that was used when app was built is not different to how you have your on-premise nginx configured. According to the screenshot you have /admin/ app prefix was used in the app, but /prefix in your nginx.

1 Like