Actually already asked my question in the title.
What I’ve done:
- Installed PHP 8, and set path to it in env. var.
- Changed file C:\Windows…\etc\hosts and added lines to it:
127.0.0.1 astrononeko.dev
127.0.0.1 www.astrononeko.dev
::1 astrononeko.dev
::1 www.astrononeko.dev
- In cmd used
ipconfig /flushdns
4) Then created directory C:\Projects\Web\php and file index.php. There is regular Hello world programm. Typed all the combinations listed below:
php -S localhost:80
php -S 127.0.0.1:80
php -S astrononeko.dev:80
php -S astrononeko.dev:4000
php -S www.astrononeko.dev:80
php -S www.astrononeko.dev:8000
php -S 0.0.0.0:80
Through browser could access only by localhost. Command curl works on every listed domains, ping does not work on any if I specify the port
Using Windows 10 and PHP 8 only
When trying to adress by domain names, getting something like this
[Wed Jun 15 15:46:19 2022] 127.0.0.1:60869 Accepted
[Wed Jun 15 15:46:19 2022] 127.0.0.1:60868 Invalid request (Unsupported SSL request)
[Wed Jun 15 15:46:19 2022] 127.0.0.1:60868 Closing
Google refers it as httpS problem, but I checked both secured http and non-secured and actually there are problems around https when using another web-servers other than built-in PHP, like Apache, which I’m not using.
Will be really glad if you could answer my question if you know what is the problem!
>Solution :
some time ago we started to change .dev for local development as .dev is a FQDN now. Why don’t you try to change in your \etc\host to something like .test
127.0.0.1 astrononeko.test
127.0.0.1 www.astrononeko.test
::1 astrononeko.test
::1 www.astrononeko.test
Also be sure that your host file is readable by php.