Ask coding questions

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

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
Voters
AndrewMarkarian
Comments
hotnewtop
SixBeeps

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 https://Server-Test-5.andrewmarkarian.repl.co, it gives you that file.

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