1

I'm trying to set the port 80 while using the built-in Symfony Server on MacOS instead of defaulting to 8000. But keep getting this error:

[ERROR] PHP-FPM failed to start: pool www] please specify user and group other than root  FPM initialization failed

Running then with "sudo" the "server:start --port=80" command seems to work but I only got a page with "File not found." displayed.

Any idea how I can use this port number?

blackarcanis
  • 119
  • 2

1 Answers1

0

By default, the CLI web server needs PHP-FPM to work (see https://symfony.com/doc/current/setup/symfony_server.html#enabling-php-fpm). It's the same problem as you describe:

Otherwise the server will start without PHP-FPM and will show a Page not found page when trying to access a .php file in the browser.

Concerning the sudo, Symfony CLI web server should be able to run fine without root privileges.

Maybe your issue is related to https://stackoverflow.com/questions/24404655/how-to-run-php-fpm-as-root/26045162#26045162.

Otherwise, if you want to avoid the Symfony CLI, you can also run your environment in Docker (for instance using https://github.com/dunglas/symfony-docker).

Crovitche
  • 1
  • 1