Level 63
Hello, you will probably have more answer if you move your post in the DevOps category.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a Laravel application that has worked so far. The @csrf are all set.
Now I have created a Docker container with nginx and PHP, and have connected the container to a domain via an nginx proxy.
php:
image: php:8.3-fpm-alpine
container_name: php
volumes:
- ./html:/var/www/html
restart: unless-stopped
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf:ro
- ./html:/var/www/html
ports:
- 1234:80
restart: unless-stopped
My default.conf
server {
listen 80;
index index.php index.html;
server_name _;
root /var/www/html/public;
....
}
my .env
APP_URL=https://my.domain.tld
SESSION_DOMAIN=my.domain.tld
SESSION_SECURE_COOKIE=false
I have also tried to add this in bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
$middleware->trustProxies(at: [
'*',
]);
})
What have I forgotten, or what am I not seeing right now?
@vincent15000 thank you. I have change the category Edit: The issue was a wrong database. After I have set the session to file it works (I don't need a DB)
Please or to participate in this conversation.