Skip to content

Commit

Permalink
Removed double quotes for port number and added some inline code synt…
Browse files Browse the repository at this point in the history
…ax highlighting with back-ticks. (#1717)

* Removed double quotes for port number and added some inline code syntax highlighting with back-ticks.

* Added one more inline code syntax highlighting.
  • Loading branch information
hchen99 authored May 23, 2024
1 parent ee2f824 commit 27e4264
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/documentation/web/Webserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ adding a web server to your simulation simply requires including the CivetServer

## Configuration of the Web Server

The following (input.py) parameters are available to configure your web server:

|Parameter Name | Default Value | Description |
|---------------------------|---------------------------|-----------------------------------------------------------------|
|web.server.enable | False |Must be explicitly enabled |
|web.server.port | "8888" |Web servers “listen” port |
|web.server.document_root | "www" |Web servers document root |
|web.server.debug | False |Print Client/Server Communication. |
|web.server.ssl_enable | False |Encrypt traffic. Uses https instead of http. |
|web.server.path_to_ssl_cert|"~/.ssl/server.pem" |Path to your certificate. This is only used if ssl_enable = True|
|web.server.error_log_file | "civet_server_error.log" |CivetWeb error log file. |
The following (`input.py`) parameters are available to configure your web server:

|Parameter Name | Default Value | Description |
|---------------------------|---------------------------|-------------------------------------------------------------------|
|web.server.enable | `False` |Must be explicitly enabled |
|web.server.port | `8888` |Web servers “listen” port |
|web.server.document_root | `"www"` |Web servers document root |
|web.server.debug | `False` |Print Client/Server Communication. |
|web.server.ssl_enable | `False` |Encrypt traffic. Uses https instead of http. |
|web.server.path_to_ssl_cert|`"~/.ssl/server.pem"` |Path to your certificate. This is only used if `ssl_enable = True`|
|web.server.error_log_file |`"civet_server_error.log"` |CivetWeb error log file. |

For your web server to be active, you must at least specify the following :

Expand All @@ -31,10 +31,10 @@ web.server.enable = True

```

To have your web server listen on port 8890, rather than 8888, you would specify:
To have your web server listen on port `8890`, rather than `8888`, you would specify:

```python
web.server.port = "8890"
web.server.port = 8890
```

To serve files from a directory called ```my_document_root```, rather than ```www```:
Expand All @@ -50,11 +50,11 @@ web.server.debug = True
```

## When the Web Server Starts
The web server, if enabled, will start during sim initialization. When it does, it will look for the specified document root directory. By default that’s “www”. If root directory doesn’t exist, one will be created with a simple index.html file , a style sheet, and a couple of directories.
The web server, if enabled, will start during sim initialization. When it does, it will look for the specified document root directory. By default that’s `“www”`. If root directory doesn’t exist, one will be created with a simple `index.html` file , a style sheet, and a couple of directories.


## Connecting to Your Web Server
Assuming that you accepted the default port, connect to ```http://localhost:8888/``` (```https://localhost:8888/``` if ssl_enable=True) from your web browser. This will display the index.html file in your root directory.
Assuming that you accepted the default port, connect to ```http://localhost:8888/``` (```https://localhost:8888/``` if `ssl_enable=True`) from your web browser. This will display the `index.html` file in your root directory.


## The Default Document Root Directory
Expand All @@ -69,7 +69,7 @@ www/
images/
```

**index.html** is the file that’s displayed when you connect to http://localhost:8888/.
**index.html** is the file that’s displayed when you connect to `http://localhost:8888/`.

**style.css** is a CSS style-sheet that’s included by index.html to give it some pizzazz.

Expand Down

0 comments on commit 27e4264

Please sign in to comment.