1

Raspberry PI running Ubuntu 20.04 hosting a dotnet 6 (core) web application. DotNet by default listens to port 5000 (HTTP) and port 5001 (HTTPS). I can get http://mydomain to work but I CANNOT get HTTPS to work. My Program.cs file is set to for UseHttpsRedirection (Which works on localhost)

Note: I developed webapp on my local machine, published and deployed web app to Ubuntu (Raspberry PI) Here is my config file

<VirtualHost *:80>
   ServerName me.com
   ServerAdmin admin@me.com
   Redirect "/" https://me.com
   ErrorLog ${APACHE_LOG_DIR}/error-me.com-ssl.log
   CustomLog ${APACHE_LOG_DIR}/access-me.com-ssl.log combined
</VirtualHost>

<VirtualHost *:443> ServerName me.com DocumentRoot /var/www/me.com ProxyPreserveHost On ProxyPass / https://127.0.0.1:5001/ ProxyPassReverse / https://127.0.0.1:5001/ SSLEngine on SSLCertificateFile "/etc/ssl/certs/server.me.com.crt" SSLCertificateKeyFile "/etc/ssl/private/server.me.com.key" </VirtualHost>

DavidJS
  • 131

0 Answers0