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

eberteo's avatar

Error running php artisan r:l

Not really sure why this is happening. Using nginx for server.

C:\laragon\www\iapwo2\membership(master -> origin) λ php artisan r:l

Symfony\Component\HttpKernel\Exception\HttpException

Environment Not Allowed

at C:\laragon\www\iapwo2\membership\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:1224 1220▕ if ($code == 404) { 1221▕ throw new NotFoundHttpException($message, null, 0, $headers); 1222▕ } 1223▕ ➜ 1224▕ throw new HttpException($code, $message, null, $headers); 1225▕ } 1226▕ 1227▕ /** 1228▕ * Register a terminating callback with the application.

1 C:\laragon\www\iapwo2\membership\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php:45 Illuminate\Foundation\Application::abort("Environment Not Allowed", [])

2 C:\laragon\www\iapwo2\membership\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php:86 abort("Environment Not Allowed", [])

In case attaching my ipwo2.test.conf:

server { listen 8080; listen 8443 ssl; server_name iapwo2.test *.iapwo2.test; root "C:/laragon/www/iapwo2/wordpress"; index index.html index.htm index.php;

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

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass php_upstream;
    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;
}   

location = /favicon.ico {
		log_not_found off;
		access_log off;
}

location = /robots.txt {
		allow all;
		log_not_found off;
		access_log off;
}
	
location /membership {
    
	alias "C:/laragon/www/iapwo2/membership/public";
	try_files $uri $uri/ @directorySub;
	
	location ~ \.php$ {
		include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME $request_filename;
		fastcgi_pass php_upstream;
		fastcgi_buffers 16 16k;
		fastcgi_buffer_size 32k;
	}
}

location /membership/storage {
	alias   "C:/laragon/www/iapwo2/membership/storage";
}

location /membership/vendor {
	alias   "C:/laragon/www/iapwo2/membership/public/vendor";
}

location @directorySub {
    rewrite /membership/(.*)$ /membership/index.php?/ last;
}

}

0 likes
0 replies

Please or to participate in this conversation.