-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from tdameros/readme
add readme
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# 42 Webserv | ||
|
||
Webserv is a project from School 42 aiming to implement an HTTP server in C++ | ||
according to the specifications of the HTTP/1.1 | ||
protocol ([see RFC2616](docs/rfc2616.pdf)). | ||
|
||
## Features | ||
|
||
- Handling of GET, POST, DELETE requests | ||
- Support for standard HTTP headers | ||
- Management of virtual servers | ||
- Support for persistent connections | ||
- Handling of static and dynamic files | ||
- Support for CGI (Common Gateway Interface) | ||
- Configuration management via configuration files | ||
|
||
## Usage | ||
|
||
### Local | ||
|
||
```bash | ||
make | ||
./webserv -l1 -c resources/webserv.conf | ||
``` | ||
|
||
### Docker | ||
|
||
```bash | ||
make build_image | ||
make run_container | ||
``` | ||
|
||
Open the following link in your browser to access the demo | ||
site: http://localhost:4243. | ||
|
||
In the local version, remember to modify the paths to the Python and Bash CGI | ||
binaries in the configuration file to avoid getting 500 errors. | ||
|
||
### Options | ||
|
||
``` | ||
./webserv -h 1 ↵ tdameros@Mac-hine | ||
Webserv 1.0 | ||
Usage: webserv [options] *.conf | ||
webserv -c example.conf | ||
Options: | ||
-h, --help Show this help message. | ||
-l, --log-level=LEVEL Set the logging level (LEVEL between 0 and 4). | ||
DEBUG, INFO, WARNING, ERROR, CRITICAL | ||
-f, --log-file=FILE Specify the log file (FILE). | ||
-c, --log-color Enable colored logging output. | ||
-s, --syntax Check the syntax of the configuration file. | ||
``` | ||
|
||
## Screenshots | ||
|
||
![example](resources/example.png) | ||
|
||
## Running Tests | ||
|
||
The tests use Python along with Siege to conduct stress tests on the web server. | ||
|
||
```bash | ||
make test | ||
``` | ||
|
||
## Documentation | ||
|
||
- [Configuration files](docs/config_file.md) | ||
- [RFC2616](docs/rfc2616.pdf) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.