1

How to enable SSL on Pyramid 2018 website and forward all HTTP request to HTTPS

To be able to use SSL for Pyramid 2018 website it should be installed using the IIS option.
Once installed add an SSL bindings as shown below:

  1. Right Click on the "Pyramid2018" site and choose edit bindings(1)>Click on Add(2)>Choose "https"(3)>set the required 
    host name(4) > Choose your SSL certificate(5)
     
  2. Edit the web.config of the site, which by default is: C:\program files\pyramid 2018\repository\iis\web.config

    Add the following lines (in Bold text):
    By adding these lines in the web.config, all HTTP requests will be redirected to HTTPS.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
          <match url="(.*)" />
          <conditions logicalGrouping="MatchAny">
            <add input="{SERVER_PORT_SECURE}" pattern="^0$" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
        </rule>
        <rule name="ReverseProxyInboundRule1" stopProcessing="true">
          <match url="(.*)" />
          <action type="Rewrite" url="http://localhost:8181/{R:1}" />
        </rule>
      </rules>
    </rewrite>
    <defaultDocument>
      <files>
        <clear />
        <add value="readme.html" />
      </files>
    </defaultDocument>
  </system.webServer>
 </configuration>
3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Yakov Shaul

    I can't remember which option we chose, we deployed the server a long time ago when Pyramid 2018 was first announced. It looks like I don't have IIS on the webserver, is there a way to migrate so I can upload my SSL certificate?

    Reply Like
  • Hi Alister,

    You can install IIS  explained here and then following the instructions in the link below on how to create the Pyramid2018 site so that you can use SSL on your site.

    https://community.pyramidanalytics.com/t/635fyg/how-to-create-a-pyramid-2018-website-in-iis-after-an-install

    If you require further assistance, please open a support ticket with us and we will follow up with you.

    Thank you.

    Reply Like 1
  • Just FYI:

    Using IIS for SSL and URL processing is only one option for Windows based servers. You can use alternative "reverse proxy" technologies like NGINX (good for Windows or Linux) and F5 (hardware). IIS is not a required  layer in choosing alternatives.

    Reply Like 1
reply to topic
Like1 Follow
  • 1 Likes
  • 2 wk agoLast active
  • 3Replies
  • 719Views
  • 4 Following