Simple Web ServerSimple Web Server
Download
Documentation
  • English
  • العربية
  • Azərbaycanca
  • Deutsch
  • Español
  • Français
  • Magyar
  • Italiano
  • 日本
  • 한국어
  • Nederlands
  • Português
  • Русский
  • Svenska
  • தமிழ்
  • Українська
  • 简体中文
  • 繁體中文
GitHub
Download
Documentation
  • English
  • العربية
  • Azərbaycanca
  • Deutsch
  • Español
  • Français
  • Magyar
  • Italiano
  • 日本
  • 한국어
  • Nederlands
  • Português
  • Русский
  • Svenska
  • தமிழ்
  • Українська
  • 简体中文
  • 繁體中文
GitHub
    • Server Options
    • App Settings
    • Editing config.json
    • Using HTTPS
    • Viewing logs
    • Building from source
    • Coming from Web Server for Chrome?
    • Introduction to plugins
    • Plugin manifest file
    • Plugin script
    • Advanced configuration using .swshtaccess files
    • Using custom scripts
    • Creating a custom request handler

Using HTTPS

Simple Web Server automatically generates a dummy certificate when you enable HTTPS, but you can also use your own custom HTTPS certificate if needed.

Using a dummy certificate for testing purposes

Some newer web APIs require a secure (https) connection in order to use certain features. While this isn't a problem when testing on localhost (see Secure contexts on MDN), you may want to use a dummy HTTPS certificate to test these features on other devices over LAN.

When you enable HTTPS by checking the HTTPS checkbox, Simple Web Server will automatically generate a self-signed dummy certificate for you. You don't need to do anything else unless you want to use a custom certificate (see below).

Because the certificate is self-signed, you will receive an error message in the browser.

Unsecure connection warning message in Google Chrome.

For testing purposes, you can bypass this error:

Chrome: Type thisisunsafe on your keyboard while on this screen.

Firefox: Click "Advanced..." and then click "Accept the Risk and Continue".

Safari: Click "Show details", click "visit this website" and then click "Visit website" to confirm.

Using a custom certificate

If you want to use your own certificate instead of the automatically generated dummy certificate, you can provide custom certificate files in the SSL/TLS certificate and SSL/TLS private key fields.

The file fullchain.pem corresponds to the SSL/TLS certificate.

The file privkey.pem corresponds to the SSL/TLS private key.

When you provide custom certificate values, they will override the automatically generated dummy certificate.

Edit this page on GitHub
Prev
Editing config.json
Next
Viewing logs