Open nbish11 opened 1 year ago
Sorry but no: the PHP developers have enough on their plate running a programming language that powers about 3/4ths of the internet without adding the second duty of maintaining a fully-capable web server.
Projects like Apache, nginx, Swoole, ReactPHP, are in a much better position to deliver a quality product than we are.
I'm going to re-open this as having more capable built in web server might be desirable and it is not something that we should just reject. What I would imagine is to more re-use logic with stream in cli server which would allow more options like tls support and other things.
Description
It would be good if we could use PHPs built-in server for smaller website deployments, rather than having to use nginx, apache, caddy, swoole, amp, react php, etc.
Ideally, for development I can do
php -S 0.0.0.0:8443 --dev -t public/index.php --tls-cert letsencrypt.crt --tls-key letsencrypt.key --http2
And then for development, I can do
php -S 0.0.0.0:8443 --prod -t public/index.php --tls-cert localhost.crt --tls-key localhost.key --http2
And then in php file:
Or something to that effect