Http Webserver
Basic Web server in C for Linux..
- You will have to change the path of the default webpage. It depends
on where you store the code file and the 'index.htm' page.
- Compile the program.
gcc -lpthread httpwebserver.c
- After compiling run the program with port number as the parameter.
./a.out 3000 (you can enter any free port number)
- Open your web browser and enter "127.0.0.1:xyz" (without the quotes)
where xyz is the port number you entered, in the address bar.
- To shutdown the server press Ctrl + C
- If
you get "Cannot bind Ip and Port" error then try some other port number.
This file was downloaded from www.sumedhk.com
Copyright ©® 2002-05 Sumedh K