A story about ssl certificates and their usage in azure webapps

explorer.exe .
req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crtopenssl pkcs12 -export -out certificate.pfx -inkey private.key -in certificate.crt
Failed to add SSL binding. The certificate with thumbprint 'B65EA5ED6534A4233257062EE7F13E89701C643E' is invalid for SSL. The Enhanced Key Usage must be present and must contain Server Authentication (1.3.6.1.5.5.7.3.1).
req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt -addext "extendedKeyUsage=serverAuth"openssl pkcs12 -export -out certificate.pfx -inkey private.key -in certificate.crt
<system.webServer> 
<rewrite>
<rules>
<rule name="redirect-rule-name" enabled="true">
<match url="^(.*)$" />
<conditions>
<add input="{HTTP_HOST}" pattern="^subdomain\.domain\.com$" />
</conditions>
<action type="Redirect" url="https://redirect-domain.azurewebsites.net/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sebastian Gedda

Sebastian Gedda

Full stack developer living in Stockholm involved in tech startups.