Ask coding questions

← Back to all posts
How to Make a Basic Server With Php Web Server

Hello. I want to know how I can make a basic server with Php Web Server. I couldn't find anything useful online, so I am asking you. Could you help me please?

Answered by SixBeeps [earned 5 cycles]
View Answer

What you have right now technically counts as a web server. A web server:

  • Exists on a computer
  • Contains files
  • Will give other computers its files when asked for them

In your case, the Repl is running on a virtual computer, it has a file named index.php, and when you go to, it gives you that file.

When you run the Repl, the command php -S -t . automatically gets called. This is what turns a normal computer into a server.