Crates.io | srws |
lib.rs | srws |
version | 0.2.3 |
source | src |
created_at | 2020-03-15 21:00:03.692252 |
updated_at | 2020-03-17 20:02:37.606754 |
description | srws (Simple rust web server) is a simple HTTP only web server. |
homepage | https://github.com/depsterr/srws |
repository | https://github.com/depsterr/srws |
max_upload_size | |
id | 218987 |
size | 10,677 |
srws (Simple rust web server) is a simple HTTP only web server I'm writing in rust in order to learn the language.
I've tried to make the server somewhat safe, however I cannot guarantee it's safety, so if you wish to use it then do so at your own risk. That being said, I've tried using relative paths to read files, both with curl and with netcat and both have just retrieved 404 pages.
To configure the web server you can set these values in /etc/srws.conf
address
allow_sym
directory
multiple_hosts
not_found_page
If not configuration file is found these defaults will be used:
address 0.0.0.0:80
directory /var/www/html
not_found_page /var/www/404.html
allow_sym false
multiple_hosts false
To install the binary into /bin/srws and enable the service run the following commands.
sh install.sh
sudo systemctl enable srws
sudo systemctl start srws
If you simply wish to compile the binary you can run
cargo build
and if you want to install the program localy you can run
cargo install --path .