I can't see my website.

learnationops-collab
HOBBYOP

20 days ago

I'm seeing a 502 error. I've tried various ways to resolve it, but everything points to the error being Railway.
$10 Bounty

9 Replies

Railway
BOT

20 days ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


Argh, the good ol' error 502.

Is ye aware of ye port for ye webserver? Is ye generated domain pointing to thy?


learnationops-collab
HOBBYOP

20 days ago

Hi, thanks for looking into this. To answer your questions:

  1. Yes, my webserver (Nginx) is configured to listen on port 9000, which is the port assigned by the $PORT environment variable.

  2. Yes, the generated domain is pointing correctly to the service. I am receiving a 502 error, which confirms the requests are reaching the Nginx server.

I believe the issue is an internal 502 error. I've been debugging an issue where Nginx can't communicate with the upstream PHP-FPM process. I suspect the PHP-FPM worker is crashing. We have already tried multiple solutions, including ensuring the correct PHP extensions are installed and checking all environment variables.

Attachments


learnationops-collab
HOBBYOP

20 days ago

The Deploy Logs:
Starting Container

Building frontend assets...

> build

> vite build

vite v7.0.6 building for production...

transforming...

✓ 7 modules transformed.

rendering chunks...

computing gzip size...

public/build/manifest.json 0.31 kB │ gzip: 0.16 kB

public/build/assets/app-D6w85uKG.css 199.31 kB │ gzip: 27.54 kB

public/build/assets/app-Dp4okpsf.js 73.61 kB │ gzip: 21.33 kB

✓ built in 811ms

Running database migrations...

INFO Nothing to migrate.

Starting services...

2025-10-19 21:10:52,841 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.

2025-10-19 21:10:52,843 INFO supervisord started with pid 1

2025-10-19 21:10:53,845 INFO spawned: 'nginx' with pid 59

2025-10-19 21:10:53,847 INFO spawned: 'php-fpm' with pid 60

2025-10-19 21:10:53,849 INFO spawned: 'reverb' with pid 61

[19-Oct-2025 21:10:53] NOTICE: fpm is running, pid 60

[19-Oct-2025 21:10:53] NOTICE: ready to handle connections

INFO Starting server on 0.0.0.0:8081 (athletic-cooperation-production.up.railway.app).

2025-10-19 21:10:55,039 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2025-10-19 21:10:55,039 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2025-10-19 21:10:55,039 INFO success: reverb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)


If you’re using Nginx, you’ll have to restart the proxy every time the service is redeployed. Have you done this?

To solve the above I recommend switching to Caddy.


learnationops-collab
HOBBYOP

20 days ago

I switched to Caddy, checked the environment variables and still get the same 502 error.

learnationops-collab

I switched to Caddy, checked the environment variables and still get the same 502 error.

Can you share your Caddy configuration as well as add a HOST variable on your service that says ::?


learnationops-collab
HOBBYOP

20 days ago

I added the variable and configured caddy like this
{
    http_port {$PORT}
}

{$HOST}:{$PORT} {
    root * /app/public
    file_server
    php_fastcgi 127.0.0.1:9000
}

learnationops-collab
HOBBYOP

20 days ago

HTTP 400 urn:ietf:params:acme:error:rejectedIdentifier - Invalid identifiers requested :: Cannot issue for ":::8080": Domain name contains an invalid character

[:::8080] Obtain: [:::8080] creating new order: attempt 1: https://acme-staging-v02.api.letsencrypt.org/acme/new-order: HTTP 400 urn:ietf:params:acme:error:rejectedIdentifier - Invalid identifiers requested :: Cannot issue for ":::8080": Domain name contains an invalid character (ca=https://acme-staging-v02.api.letsencrypt.org/directory)

Attachments


I can't see my website. - Railway Help Station