R
Railway13mo ago
ryy

Forbidden Access (403)

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
11 Replies
Percy
Percy13mo ago
Project ID: 78437940-50ad-4708-8953-68a5a25dffbd
ryy
ryyOP13mo ago
78437940-50ad-4708-8953-68a5a25dffbd
Brody
Brody13mo ago
can you share your repo?
ryy
ryyOP13mo ago
GitHub
GitHub - heriira/ci4_nixpact
Contribute to heriira/ci4_nixpact development by creating an account on GitHub.
Brody
Brody13mo ago
@aleks any ideas?
root
root13mo ago
What's nixpact.toml? Try setting the NIXPACKS_PHP_ROOT_DIR environment variable to public. Ah, also set NIXPACKS_PHP_FALLBACK_PATH to /index.php.
ryy
ryyOP13mo ago
@aleks 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]
No description
No description
No description
root
root13mo ago
Oh, sorry, NIXPACKS_PHP_ROOT_DIR should be /app/public. Did you mean to make nixpacks.toml instead of nixpact.toml?
ryy
ryyOP13mo ago
@aleks 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?
No description
root
root13mo ago
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
ryy
ryyOP13mo ago
@aleks yes, I have tried it, and it doesn't work. Actually, I just want to deploy CI4 starter on the Railway platform. Inside this project, I haven't added anything yet. So, if you're willing, maybe you can try deploying the CodeIgniter 4 starter on Railway, and later I will follow the template you create. I really appreciate it, thank you
Want results from more Discord servers?
Add your server