#Forbidden Access (403)

14 messages · Page 1 of 1 (latest)

scenic hull
#

I am trying to deploy CI4 on Railway using the Nixpact builder, everything runs smoothly, but when the domain is accessed, a 403 nginx error occurs. The error message in the log is as follows:

2023/11/01 11:03:37 [error] 23#23: *2 directory index of "/app/" is forbidden, client: 192.168.0.3, server: localhost, request: "GET / HTTP/1.1", host: "ci4nixpact-production.up.railway.app"

Please help me, thank you

mild currentBOT
#

Project ID: 78437940-50ad-4708-8953-68a5a25dffbd

scenic hull
#

78437940-50ad-4708-8953-68a5a25dffbd

flint quartz
#

can you share your repo?

scenic hull
flint quartz
#

@nocturne belfry any ideas?

nocturne belfry
#

What's nixpact.toml?

#

Try setting the NIXPACKS_PHP_ROOT_DIR environment variable to public.

nocturne belfry
#

Ah, also set NIXPACKS_PHP_FALLBACK_PATH to /index.php.

scenic hull
#

@nocturne belfry just ignore it's an exploration to solve this problem.

I have tried to add both empironments in train, and now the error displayed is file not found [attached]

nocturne belfry
#

Oh, sorry, NIXPACKS_PHP_ROOT_DIR should be /app/public.

#

Did you mean to make nixpacks.toml instead of nixpact.toml?

scenic hull
#

@nocturne belfry Yes, I tried to create that file but there was a typo when naming the file. now I have named it correctly.
I have tried changing NIXPACKS_PHP_ROOT_DIR to /app/public. now the error has changed [attached]
Is there another environment I'm missing?

nocturne belfry
#

Ah. Would it be possible for you to use /app/storage instead of /app/writable for the moment? I'll PR a variable to configure that, though