diff --git a/docs/documentation/web/Adding_SSL_encryption_to_Your_Webserver.md b/docs/documentation/web/Adding_SSL_encryption_to_Your_Webserver.md new file mode 100644 index 00000000..637b2adb --- /dev/null +++ b/docs/documentation/web/Adding_SSL_encryption_to_Your_Webserver.md @@ -0,0 +1,36 @@ +# Adding SSL Encryption to Your Webserver + +## Getting started ++ Install OpenSSL on your system. There are OpenSSL install packages for all major Linux distributions. ++ Create a SSL certificate ++ Edit your input file + +## Creating a SSL certificate +You can use your own certificate but to create a self signed certificate follow the steps below: +``` + openssl genrsa -des3 -out server.key 1024 + + openssl req -new -key server.key -out server.csr + + cp server.key server.key.orig + + openssl rsa -in server.key.orig -out server.key + + openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt + + cp server.crt server.pem + + cat server.key >> server.pem +``` + +## Edit your input file + +add the following lines to your input file +```python +web.server.ssl_enable = True +web.server.path_to_ssl_cert = server.pem +``` +Where server.pem is the path to the server.pem file you created when creating a SSL certificate + +## Access your webserver +Now that ssl encryption is enabled, to access you webserver use https://localhost.ssl:8888 instead of http and wss://localhost.ssl:8888 for http and ws protocals respectively. diff --git a/docs/documentation/web/Extending_the_HTTP-API.md b/docs/documentation/web/Extending_the_HTTP-API.md index e0b25336..923b31f6 100644 --- a/docs/documentation/web/Extending_the_HTTP-API.md +++ b/docs/documentation/web/Extending_the_HTTP-API.md @@ -1,4 +1,4 @@ -##Extending the HTTP-API +## Extending the HTTP-API The HTTP-API is implemented as a collection of ```httpMethodHandlers```. An ```httpMethodHandler``` is a pointer to a function that is expected to respond to an HTTP GET request, using the **CivetWeb** framework. An ```httpMethodHandler``` is defined (in ```trick/CivetWeb.hh```) as follows: diff --git a/docs/documentation/web/Extending_the_WS-API.md b/docs/documentation/web/Extending_the_WS-API.md index 69b144af..21da130d 100644 --- a/docs/documentation/web/Extending_the_WS-API.md +++ b/docs/documentation/web/Extending_the_WS-API.md @@ -1,4 +1,4 @@ -#Extending the WebSocket-API +## Extending the WebSocket-API ## When You Create a WebSocket Connection