Welcome to webserv ⛁

See below the examples we have prepared

Custom errorpage 🆇

going to our fbi.com page will present you a custom 404 page

Multiple routes ⇶

you can setup many routes for one server and serve a different page for each of them

localhost/dog

localhost/cat

localhost/gandalf

Redirect ↪

Clicking here will send your browser a response with a 307 status code and redirect you to a wikipedia page

redirect

example.com and servernames

Let's look at how the name of a server matters

As we don't control the example.com domain we have to instruct curl to go to our webserver with the --resolve flag

curl --resolve example.com:8001:127.0.0.1 http://example.com:8001/

the postoffice (POST requests)

The (fictious) postoffice has examples to look at POST requests

client body limit

Try it in the post office when uploading a file or with curl:

curl -X POST -H "Content-Type: plain/text" --data "Body content sending in request (42 bytes)" http://c.000031.xyz:8080/

This example makes a POST request with a body that has 42 bytes

Media ♫

Look at our media pages, where we serve you with images, videos and music

enter

Uploaded files

Got to the folder of uploaded files here