SeaWeb
Running
It is recommended to run this application using Docker.
For a deployment running the application without HTTPS run make dockerTestDeploy, this will open a socket on port 8080.
For a deployment running the application with HTTPS run make dockerReleaseDeploy, this will also open a socket on port 8080.
Running make killTestDocker will kill the running instance of seaweb:latest running in Docker.
To view logs within the running container run docker exec -it $(docker ps | grep "seaweb:latest" | grep -o '[^ ]*$') tail -f /var/log/seaweb/log, or manually view the /var/log/seaweb/log file within the container.
If you run this application without Docker please ensure the OpenSSL development headers are installed onto your system, this will be important if running with HTTPS.
To build this application outside of Docker run make, and the binary will be built into ./bin.
Running ./bin/seaweb --help or ./bin/seaweb -h will show you the help message for the application showing all possible options.
By default the application is compiled to utilize /var/www/html as the WEB root, and will output logs to /var/log/seaweb/log; if running the application outside of Docker please ensure this is setup with correct permissions to run.
Notes
- All new connections will spawn a child process which is used to deal with the request
- If the process takes longer than 5 seconds to resolve the request, the child process will be killed
- Running
make genCertswill generate a root authority and generate certificates to utilize for the web server- Certificate authority related files start with
cawhile the certificates which should be utilized for the web server omit theca
- Certificate authority related files start with
- Making a request to the web server which does not match the current protocol (e.g. making a https request when it is server http) will result in the server ignoring the request
- Returning an error here is not possible since if we have a none SSL socket created we cannot respond to a SSL request
- This will cause a fork of the process to spawn which will be killed in 5 seconds after the timeout is met
- If a request to the root directory is made,
/, it is assumed that the user was trying to navigate to/index.htmland the request will be treated as such