summaryrefslogtreecommitdiff
path: root/md/writeup/basic_http_server.md
blob: 249c3900c1d793a6b42de4afa307df4e16085077 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
title:Basic HTTP server
keywords:c,http,server

# Basic HTTP server
Basic HTTP server. When you type url it shows listing of your local directory. If you tipe with path to file name noting hapens
Use:
```sh
http://*.*.*.*:<port>/ -> disk start directory
http://*.*.*.*:<port>/home/ -> home directory
```
Run:
```sh
./server [port]
```

Compile:
```sh
gcc server.c -o server
```

Here is also python source. It runs on port:8081 and prints in terminal HTTP request. You can see what browser sends to server.

## Downloads
servpy.zip - 
1KiB - http://archive.main.lv/files/writeup/basic_http_server/servpy.zip  
serverc.zip - 
2KiB - http://archive.main.lv/files/writeup/basic_http_server/serverc.zip