[GH-ISSUE #4289] [bug]: Admin Dashboard and Login pane not showing up, 405 and configuration errors. #1561

Open
opened 2026-03-16 20:50:59 +03:00 by kerem · 1 comment
Owner

Originally created by @ozansnmz on GitHub (Aug 23, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4289

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I installed a fresh installation of hoppscotch via the documentation at https://docs.hoppscotch.io/documentation/self-host/getting-started , I tried both AIO and seperate containers. Here is where I'm at:

I tried reinstalling and installing it again over 6 times with gathering all the data I try to get from the github issues page. But here are my existing problems:

1- ozzysonmez.com.tr : login page do no work
2- ozzysonmez.com.tr/admin : redirects to 404, :3100 redirects to a blank page with the following errors:
CleanShot 2024-08-23 at 12 24 45@2x

my .env file:

`#-----------------------Backend Config------------------------------#

Prisma Config

DATABASE_URL=postgresql://postgres:PASSWORDOBFUSCATED@194.163.181.76:5432/DBOBFUSCATED

Auth Tokens Config

JWT_SECRET=SECRETOBFUSCATED
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY=3
REFRESH_TOKEN_VALIDITY=604800000 # Default validity is 7 days (604800000 ms) in ms
ACCESS_TOKEN_VALIDITY=86400000 # Default validity is 1 day (86400000 ms) in ms
SESSION_SECRET=SECRETOBFUSCATED
ALLOW_SECURE_COOKIES=true

Hoppscotch App Domain Config

REDIRECT_URL=https://ozzysonmez.com.tr
WHITELISTED_ORIGINS=https://ozzysonmez.com.tr
VITE_ALLOWED_AUTH_PROVIDERS=EMAIL,GOOGLE

Google Auth Config

GOOGLE_CLIENT_ID=OBFUSCATED
GOOGLE_CLIENT_SECRET=OBFUSCATED
GOOGLE_CALLBACK_URL=https://ozzysonmez.com.tr/v1/auth/google/callback
GOOGLE_SCOPE=email,profile

Mailer config

MAILER_SMTP_ENABLE=true
MAILER_USE_CUSTOM_CONFIGS=false
MAILER_ADDRESS_FROM=Perculus Internal internal@percul.us

MAILER_SMTP_URL=smtps://74d99b002@smtp-brevo.com:OBFUSCATED:587

Rate Limit Config

RATE_LIMIT_TTL=60 # In seconds
RATE_LIMIT_MAX=100 # Max requests per IP

#-----------------------Frontend Config------------------------------#

Base URLs

VITE_BASE_URL=https://ozzysonmez.com.tr
VITE_SHORTCODE_BASE_URL=https://ozzysonmez.com.tr
VITE_ADMIN_URL=https://ozzysonmez.com.tr/admin

Backend URLs

VITE_BACKEND_GQL_URL=https://ozzysonmez.com.tr/graphql
VITE_BACKEND_WS_URL=wss://ozzysonmez.com.tr/graphql
VITE_BACKEND_API_URL=https://ozzysonmez.com.tr/v1

Terms Of Service And Privacy Policy Links (Optional)

VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy

Set to true for subpath based access

ENABLE_SUBPATH_BASED_ACCESS=false
`

my nginx configuration:

`server {
listen 80;
server_name ozzysonmez.com.tr www.ozzysonmez.com.tr;

# Redirect all HTTP requests to HTTPS
return 301 https://$host$request_uri;

}

server {
listen 443 ssl;
server_name ozzysonmez.com.tr www.ozzysonmez.com.tr;

# SSL configuration
ssl_certificate /etc/letsencrypt/live/ozzysonmez.com.tr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ozzysonmez.com.tr/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;

# Enable detailed logging for debugging
error_log /var/log/nginx/ozzysonmez_error.log debug;

# Security Headers
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

# Broad CORS Configuration
location / {
    # Handle preflight requests
    if ($request_method = OPTIONS) {
        add_header Access-Control-Allow-Origin "*";
        add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD";
        add_header Access-Control-Allow-Headers "*";
        add_header Access-Control-Allow-Credentials "true";
        add_header Access-Control-Max-Age 86400;
        add_header Content-Length 0;
        add_header Content-Type text/plain;
        return 204;
    }

    add_header Access-Control-Allow-Origin "*";
    add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD";
    add_header Access-Control-Allow-Headers "*";
    add_header Access-Control-Allow-Credentials "true";

    # Proxy to your backend (assuming it's running on port 3000)
    proxy_pass http://localhost:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # Additional directives to avoid 405 errors
    proxy_set_header Access-Control-Allow-Origin "*";
    proxy_set_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD";
    proxy_set_header Access-Control-Allow-Headers "*";
    proxy_set_header Access-Control-Allow-Credentials "true";
    proxy_set_header Content-Length "";
    proxy_set_header Content-Type "";
}

# Handle WebSocket connections (GraphQL endpoint)
location /graphql {
    proxy_pass http://localhost:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;

    # Allow all HTTP methods
    if ($request_method !~ ^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)$ ) {
        return 405;
    }

    # CORS headers
    add_header Access-Control-Allow-Origin "*";
    add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD";
    add_header Access-Control-Allow-Headers "*";
    add_header Access-Control-Allow-Credentials "true";

    # Additional directives to avoid 405 errors
    proxy_set_header Access-Control-Allow-Origin "*";
    proxy_set_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD";
    proxy_set_header Access-Control-Allow-Headers "*";
    proxy_set_header Access-Control-Allow-Credentials "true";
    proxy_set_header Content-Length "";
    proxy_set_header Content-Type "";
}

# Error pages
error_page 404 /404.html;
location = /404.html {
    root /var/www/ozzysonmez.com.tr;
    internal;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
    root /var/www/ozzysonmez.com.tr;
    internal;
}

}
`

docker logs for AIO container:

docker logs c114675b63b9 npm notice npm notice New patch version of npm available! 10.8.1 -> 10.8.2 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2 npm notice To update run: npm install -g npm@10.8.2 npm notice App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9807086,"msg":"using provided configuration","config_file":"/etc/caddy/aio-multiport-setup.Caddyfile","config_adapter":"caddyfile"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9864874,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//[::1]:2019","//127.0.0.1:2019","//localhost:2019"]} App/Admin Dashboard Caddy | {"level":"warn","ts":1724403832.9867966,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv3","http_port":80} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.987317,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9873762,"logger":"http.log","msg":"server running","name":"srv1","protocols":["h1","h2","h3"]} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.987412,"logger":"http.log","msg":"server running","name":"srv2","protocols":["h1","h2","h3"]} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9874723,"logger":"http.log","msg":"server running","name":"srv3","protocols":["h1","h2","h3"]} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9877396,"msg":"autosaved config (load with --resume flag)","file":"/home/hoppuser/.config/caddy/autosave.json"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9877512,"msg":"serving initial configuration"} App/Admin Dashboard Caddy | {"level":"warn","ts":1724403832.9878175,"logger":"tls","msg":"unable to get instance ID; storage clean stamps will be incomplete","error":"open /home/hoppuser/.local/share/caddy/instance.uuid: no such file or directory"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9884975,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0003ca180"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9904525,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/home/hoppuser/.local/share/caddy"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9911916,"logger":"tls","msg":"finished cleaning storage units"} Backend Server | EMAIL SSO auth provider(s) are not configured properly. Do configure them from Admin Dashboard. Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [NestFactory] Starting Nest application... Backend Server | Mailer module is disabled Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] PubSubModule dependencies initialized +439ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] PrismaModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] PassportModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] DiscoveryModule dependencies initialized +6ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TerminusModule dependencies initialized +6ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ScheduleModule dependencies initialized +2ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ConfigModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] HealthModule dependencies initialized +4ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] AppModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ThrottlerModule dependencies initialized +5ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] JwtModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserModule dependencies initialized +3ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserSettingsModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserHistoryModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserRequestModule dependencies initialized +4ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ShortcodeModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] AccessTokenModule dependencies initialized +6ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] GraphQLModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamRequestModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamCollectionModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ConfigModule dependencies initialized +60ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] MailerModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] PosthogModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamInvitationModule dependencies initialized +9ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] InfraConfigModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] AdminModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] AuthModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] InfraTokenModule dependencies initialized +1ms Backend Server | Running in production: true Backend Server | Port: 8080 Backend Server | Fri, 23 Aug 2024 09:03:55 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:41:13 Backend Server | Fri, 23 Aug 2024 09:03:55 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:41:13 Backend Server | Enabling CORS with production settings Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] AppController {/ping}: +36ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/ping, GET} route +4ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] AuthController {/auth} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/providers, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] SiteController {/site} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/site/setup, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/site/setup, PUT} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] TeamCollectionController {/team-collection} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/team-collection/search/:teamID, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] HealthController {/health}: +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/health, GET} route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] AccessTokenController {/access-tokens} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/create, POST} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/revoke, DELETE} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/list, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/collection/:id, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/environment/:id, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] InfraTokensController {/infra} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/user-invitations, POST} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/user-invitations, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/user-invitations, DELETE} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/users, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/users/:uid, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/users/:uid, PATCH} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/users/:uid, DELETE} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:56 AM LOG [RouterExplorer] Mapped {/infra/users/:uid/admin-status, PATCH} (version: 1) route +1ms Backend Server | Initialize PubSub Backend Server | EMAIL SSO auth provider(s) are not configured properly. Do configure them from Admin Dashboard. Backend Server | [Nest] 37 - 08/23/2024, 9:03:56 AM LOG [GraphQLModule] Mapped {/graphql, POST} route +569ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:56 AM LOG [NestApplication] Nest application successfully started +30ms

Steps to reproduce

  1. Followed all the steps at https://docs.hoppscotch.io/documentation/self-host/getting-started sequentially, nothing else.

Environment

Production

Version

Self-hosted

Originally created by @ozansnmz on GitHub (Aug 23, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4289 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior I installed a fresh installation of hoppscotch via the documentation at https://docs.hoppscotch.io/documentation/self-host/getting-started , I tried both AIO and seperate containers. Here is where I'm at: I tried reinstalling and installing it again over 6 times with gathering all the data I try to get from the github issues page. But here are my existing problems: 1- ozzysonmez.com.tr : login page do no work 2- ozzysonmez.com.tr/admin : redirects to 404, :3100 redirects to a blank page with the following errors: ![CleanShot 2024-08-23 at 12 24 45@2x](https://github.com/user-attachments/assets/d4041999-e924-4c65-b0f7-772b2242b844) my .env file: `#-----------------------Backend Config------------------------------# # Prisma Config DATABASE_URL=postgresql://postgres:PASSWORDOBFUSCATED@194.163.181.76:5432/DBOBFUSCATED # Auth Tokens Config JWT_SECRET=SECRETOBFUSCATED TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY=3 REFRESH_TOKEN_VALIDITY=604800000 # Default validity is 7 days (604800000 ms) in ms ACCESS_TOKEN_VALIDITY=86400000 # Default validity is 1 day (86400000 ms) in ms SESSION_SECRET=SECRETOBFUSCATED ALLOW_SECURE_COOKIES=true # Hoppscotch App Domain Config REDIRECT_URL=https://ozzysonmez.com.tr WHITELISTED_ORIGINS=https://ozzysonmez.com.tr VITE_ALLOWED_AUTH_PROVIDERS=EMAIL,GOOGLE # Google Auth Config GOOGLE_CLIENT_ID=OBFUSCATED GOOGLE_CLIENT_SECRET=OBFUSCATED GOOGLE_CALLBACK_URL=https://ozzysonmez.com.tr/v1/auth/google/callback GOOGLE_SCOPE=email,profile # Mailer config MAILER_SMTP_ENABLE=true MAILER_USE_CUSTOM_CONFIGS=false MAILER_ADDRESS_FROM=Perculus Internal <internal@percul.us> MAILER_SMTP_URL=smtps://74d99b002@smtp-brevo.com:OBFUSCATED:587 # Rate Limit Config RATE_LIMIT_TTL=60 # In seconds RATE_LIMIT_MAX=100 # Max requests per IP #-----------------------Frontend Config------------------------------# # Base URLs VITE_BASE_URL=https://ozzysonmez.com.tr VITE_SHORTCODE_BASE_URL=https://ozzysonmez.com.tr VITE_ADMIN_URL=https://ozzysonmez.com.tr/admin # Backend URLs VITE_BACKEND_GQL_URL=https://ozzysonmez.com.tr/graphql VITE_BACKEND_WS_URL=wss://ozzysonmez.com.tr/graphql VITE_BACKEND_API_URL=https://ozzysonmez.com.tr/v1 # Terms Of Service And Privacy Policy Links (Optional) VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy # Set to `true` for subpath based access ENABLE_SUBPATH_BASED_ACCESS=false ` my nginx configuration: `server { listen 80; server_name ozzysonmez.com.tr www.ozzysonmez.com.tr; # Redirect all HTTP requests to HTTPS return 301 https://$host$request_uri; } server { listen 443 ssl; server_name ozzysonmez.com.tr www.ozzysonmez.com.tr; # SSL configuration ssl_certificate /etc/letsencrypt/live/ozzysonmez.com.tr/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/ozzysonmez.com.tr/privkey.pem; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; # Enable detailed logging for debugging error_log /var/log/nginx/ozzysonmez_error.log debug; # Security Headers add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff; # Broad CORS Configuration location / { # Handle preflight requests if ($request_method = OPTIONS) { add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD"; add_header Access-Control-Allow-Headers "*"; add_header Access-Control-Allow-Credentials "true"; add_header Access-Control-Max-Age 86400; add_header Content-Length 0; add_header Content-Type text/plain; return 204; } add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD"; add_header Access-Control-Allow-Headers "*"; add_header Access-Control-Allow-Credentials "true"; # Proxy to your backend (assuming it's running on port 3000) proxy_pass http://localhost:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Additional directives to avoid 405 errors proxy_set_header Access-Control-Allow-Origin "*"; proxy_set_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD"; proxy_set_header Access-Control-Allow-Headers "*"; proxy_set_header Access-Control-Allow-Credentials "true"; proxy_set_header Content-Length ""; proxy_set_header Content-Type ""; } # Handle WebSocket connections (GraphQL endpoint) location /graphql { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; # Allow all HTTP methods if ($request_method !~ ^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)$ ) { return 405; } # CORS headers add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD"; add_header Access-Control-Allow-Headers "*"; add_header Access-Control-Allow-Credentials "true"; # Additional directives to avoid 405 errors proxy_set_header Access-Control-Allow-Origin "*"; proxy_set_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT, PATCH, HEAD"; proxy_set_header Access-Control-Allow-Headers "*"; proxy_set_header Access-Control-Allow-Credentials "true"; proxy_set_header Content-Length ""; proxy_set_header Content-Type ""; } # Error pages error_page 404 /404.html; location = /404.html { root /var/www/ozzysonmez.com.tr; internal; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/ozzysonmez.com.tr; internal; } } ` docker logs for AIO container: `docker logs c114675b63b9 npm notice npm notice New patch version of npm available! 10.8.1 -> 10.8.2 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2 npm notice To update run: npm install -g npm@10.8.2 npm notice App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9807086,"msg":"using provided configuration","config_file":"/etc/caddy/aio-multiport-setup.Caddyfile","config_adapter":"caddyfile"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9864874,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//[::1]:2019","//127.0.0.1:2019","//localhost:2019"]} App/Admin Dashboard Caddy | {"level":"warn","ts":1724403832.9867966,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv3","http_port":80} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.987317,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9873762,"logger":"http.log","msg":"server running","name":"srv1","protocols":["h1","h2","h3"]} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.987412,"logger":"http.log","msg":"server running","name":"srv2","protocols":["h1","h2","h3"]} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9874723,"logger":"http.log","msg":"server running","name":"srv3","protocols":["h1","h2","h3"]} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9877396,"msg":"autosaved config (load with --resume flag)","file":"/home/hoppuser/.config/caddy/autosave.json"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9877512,"msg":"serving initial configuration"} App/Admin Dashboard Caddy | {"level":"warn","ts":1724403832.9878175,"logger":"tls","msg":"unable to get instance ID; storage clean stamps will be incomplete","error":"open /home/hoppuser/.local/share/caddy/instance.uuid: no such file or directory"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9884975,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0003ca180"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9904525,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/home/hoppuser/.local/share/caddy"} App/Admin Dashboard Caddy | {"level":"info","ts":1724403832.9911916,"logger":"tls","msg":"finished cleaning storage units"} Backend Server | EMAIL SSO auth provider(s) are not configured properly. Do configure them from Admin Dashboard. Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [NestFactory] Starting Nest application... Backend Server | Mailer module is disabled Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] PubSubModule dependencies initialized +439ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] PrismaModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] PassportModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] DiscoveryModule dependencies initialized +6ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TerminusModule dependencies initialized +6ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ScheduleModule dependencies initialized +2ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ConfigModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] HealthModule dependencies initialized +4ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] AppModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ThrottlerModule dependencies initialized +5ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] JwtModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserModule dependencies initialized +3ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserSettingsModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserHistoryModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] UserRequestModule dependencies initialized +4ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ShortcodeModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] AccessTokenModule dependencies initialized +6ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] GraphQLModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamRequestModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamCollectionModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] ConfigModule dependencies initialized +60ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] MailerModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] PosthogModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] TeamInvitationModule dependencies initialized +9ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] InfraConfigModule dependencies initialized +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] AdminModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] AuthModule dependencies initialized +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [InstanceLoader] InfraTokenModule dependencies initialized +1ms Backend Server | Running in production: true Backend Server | Port: 8080 Backend Server | Fri, 23 Aug 2024 09:03:55 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:41:13 Backend Server | Fri, 23 Aug 2024 09:03:55 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:41:13 Backend Server | Enabling CORS with production settings Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] AppController {/ping}: +36ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/ping, GET} route +4ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] AuthController {/auth} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/providers, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] SiteController {/site} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/site/setup, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/site/setup, PUT} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] TeamCollectionController {/team-collection} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/team-collection/search/:teamID, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] HealthController {/health}: +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/health, GET} route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] AccessTokenController {/access-tokens} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/create, POST} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/revoke, DELETE} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/list, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/collection/:id, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/access-tokens/environment/:id, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RoutesResolver] InfraTokensController {/infra} (version: 1): +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/user-invitations, POST} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/user-invitations, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/user-invitations, DELETE} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/users, GET} (version: 1) route +1ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/users/:uid, GET} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/users/:uid, PATCH} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:55 AM LOG [RouterExplorer] Mapped {/infra/users/:uid, DELETE} (version: 1) route +0ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:56 AM LOG [RouterExplorer] Mapped {/infra/users/:uid/admin-status, PATCH} (version: 1) route +1ms Backend Server | Initialize PubSub Backend Server | EMAIL SSO auth provider(s) are not configured properly. Do configure them from Admin Dashboard. Backend Server | [Nest] 37 - 08/23/2024, 9:03:56 AM LOG [GraphQLModule] Mapped {/graphql, POST} route +569ms Backend Server | [Nest] 37 - 08/23/2024, 9:03:56 AM LOG [NestApplication] Nest application successfully started +30ms` ### Steps to reproduce 1. Followed all the steps at https://docs.hoppscotch.io/documentation/self-host/getting-started sequentially, nothing else. ### Environment Production ### Version Self-hosted
Author
Owner

@polsala commented on GitHub (Sep 5, 2024):

@ozansnmz Hi, probably is an nginx miss configuration problem. Without subpath variable active you need to create two configs one for admin and one for other backends,

Admin

upstream hp_admin_backend {
    server localhost:3100;
}

server {
    server_name admin.ozzysonmez.com.tr;

    location / {
        proxy_pass http://hp_admin_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        # Configuración de cache control
        add_header Cache-Control "no-cache, no-store, must-revalidate";
        add_header Pragma "no-cache";
        add_header Expires "0";
    }

    listen 443 ssl; # managed by Certbot
    ...
}

### Others

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

server_name admin.ozzysonmez.com.tr;
listen 80;
return 404; # managed by Certbot

}

upstream api_m_backend {
    server localhost:3000;
}

upstream api_auth_backend {
    server localhost:3170;
}

upstream admin_backend {
    server localhost:3100;
}

server {
    server_name ozzysonmez.com.tr;

    location / {
        proxy_pass http://api_m_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        # Configuración de cache control
        add_header Cache-Control "no-cache, no-store, must-revalidate";
        add_header Pragma "no-cache";
        add_header Expires "0";
    }

    location /admin {
        proxy_pass http://admin_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        add_header Cache-Control "no-cache, no-store, must-revalidate";
        add_header Pragma "no-cache";
        add_header Expires "0";

    }

    location /graphql {
        proxy_pass http://api_auth_backend/graphql;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        # Configuración para WebSockets
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        add_header Cache-Control "no-cache, no-store, must-revalidate";
        add_header Pragma "no-cache";
        add_header Expires "0";

    }

    location /v1/ {
        proxy_pass http://api_auth_backend/v1/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        add_header Cache-Control "no-cache, no-store, must-revalidate";
        add_header Pragma "no-cache";
        add_header Expires "0";

    }

    # Manejo de errores
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }

    listen 443 ssl; # managed by Certbot
    ...
}



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


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


}

VITE_BACKEND_GQL_URL=https://ozzysonmez.com.tr/graphql
VITE_BACKEND_WS_URL=wss://ozzysonmez.com.tr/graphql
VITE_BACKEND_API_URL=https://ozzysonmez.com.tr/v1

WHITELISTED_ORIGINS=https://ozzysonmez.com.tr,https://ozzysonmez.com.tr/admin,https://ozzysonmez.com.tr/v1,https://ozzysonmez.com.tr/graphql,https://ozzysonmez.com.tr/v1/auth/github/callback,https://admin.ozzysonmez.com.tr

PD: I recommend you use server_tokens off; in /etc/nginx/nginx.conf.

<!-- gh-comment-id:2332319080 --> @polsala commented on GitHub (Sep 5, 2024): @ozansnmz Hi, probably is an nginx miss configuration problem. Without subpath variable active you need to create two configs one for admin and one for other backends, ### Admin ``` upstream hp_admin_backend { server localhost:3100; } server { server_name admin.ozzysonmez.com.tr; location / { proxy_pass http://hp_admin_backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Configuración de cache control add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; add_header Expires "0"; } listen 443 ssl; # managed by Certbot ... } ### Others ``` server { if ($host = admin.ozzysonmez.com.tr) { return 301 https://$host$request_uri; } # managed by Certbot server_name admin.ozzysonmez.com.tr; listen 80; return 404; # managed by Certbot } ``` upstream api_m_backend { server localhost:3000; } upstream api_auth_backend { server localhost:3170; } upstream admin_backend { server localhost:3100; } server { server_name ozzysonmez.com.tr; location / { proxy_pass http://api_m_backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Configuración de cache control add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; add_header Expires "0"; } location /admin { proxy_pass http://admin_backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; add_header Expires "0"; } location /graphql { proxy_pass http://api_auth_backend/graphql; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Configuración para WebSockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; add_header Expires "0"; } location /v1/ { proxy_pass http://api_auth_backend/v1/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; add_header Expires "0"; } # Manejo de errores error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } listen 443 ssl; # managed by Certbot ... } server { if ($host = ozzysonmez.com.tr) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name ozzysonmez.com.tr; return 404; # managed by Certbot } ``` VITE_BACKEND_GQL_URL=https://ozzysonmez.com.tr/graphql VITE_BACKEND_WS_URL=wss://ozzysonmez.com.tr/graphql VITE_BACKEND_API_URL=https://ozzysonmez.com.tr/v1 WHITELISTED_ORIGINS=https://ozzysonmez.com.tr,https://ozzysonmez.com.tr/admin,https://ozzysonmez.com.tr/v1,https://ozzysonmez.com.tr/graphql,https://ozzysonmez.com.tr/v1/auth/github/callback,https://admin.ozzysonmez.com.tr PD: I recommend you use server_tokens off; in /etc/nginx/nginx.conf.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1561
No description provided.