Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gianmarx's avatar

site unreachable

"I created a new Lumen project with Laradock on Windows 11, but when I try to run the following command:"

		php -S localhost:8000 -t public

PS C:\repos\MicroServicesPHP\laradock> docker-compose up -d nginx mysql phpmyadmin redis workspace [+] Running 7/10

  • Network laradock_backend Created 3.6s
  • Network laradock_frontend Created 3.6s
  • Network laradock_default Created 3.5s ✔ Container laradock-redis-1 Started 1.3s ✔ Container laradock-mysql-1 Started 1.1s ✔ Container laradock-docker-in-docker-1 Started 1.2s ✔ Container laradock-phpmyadmin-1 Started 1.9s ✔ Container laradock-workspace-1 Started 2.2s ✔ Container laradock-php-fpm-1 Started 2.5s ✔ Container laradock-nginx-1 Started 3.1s PS C:\repos\MicroServicesPHP\laradock> docker-compose exec workspace bash root@3f3ea9be556c:/var/www# ls laradock LumenAuthorsApi root@3f3ea9be556c:/var/www# cd LumenAuthorsApi/ root@3f3ea9be556c:/var/www/LumenAuthorsApi# php -S localhost:8000 -t public [Tue Feb 13 15:35:49 2024] PHP 8.3.2-1+ubuntu20.04.1+deb.sury.org+1 Development Server (http://localhost:8000) started

but site unreachable

0 likes
4 replies
Tray2's avatar

Why are you running a php -S when you are running a fully fletched nginx in laradock?

gianmarx's avatar

@Tray2 because I saw it written in the lumen documentation. How should I start the application ?

gianmarx's avatar

@Tray2 I had already read the guide (https://laradock.io/getting-started/#B) but I'm not very familiar with nginx.

in the laradock .ENV APP_CODE_PATH_HOST=../

then I went to the laradock/nginx/sites/ folder and created a blog.test based on the laravel.conf.example

		server {
listen 80;
listen [::]:80;

server_name blog.test;
root /var/www/blog/public;
index index.php index.html index.htm;

location / {
    try_files $uri $uri/ /index.php$is_args$args;
}

location ~ \.php$ {
    try_files $uri /index.php =404;
    fastcgi_pass php-upstream;
    fastcgi_index index.php;
    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    #fixes timeouts
    fastcgi_read_timeout 600;
    include fastcgi_params;
}

location ~ /\.ht {
    deny all;
}

error_log /var/log/nginx/blog_error.log;
access_log /var/log/nginx/blog_access.log;

}

then I went here C:\Windows\System32\drivers\etc\hosts and added host

127.0.0.1 blog.test

I restart with command: docker-compose up -d nginx mysql

I go to the browser: http://blog.test/

404 Not Found nginx

Please or to participate in this conversation.