2

I have a website and Nodejs application hosted on the same AWS lightsail instance such that I want the website to connect to use the data hosted by the Nodejs application. The API is hosted on port 7200 of www.spidercartographers.co.uk such that the domain name is www.spidercartographers.co.uk:7200. I recently placed an SSL certificate on the standard domain name such that www.spidercartographers.co.uk can now be accessed through HTTPS but when loading data from the API the console logs a HTTPS to HTTP error and so the data is not loaded (on the map page when asking for where people work). Is there anyway to solve this?

I currently have /etc/apache2/sites-available/spidercartographers.conf as:

<VirtualHost *:80>
  ServerName spidercartographers.co.uk
  ServerAlias www.spidercartographers.co.uk

  ProxyRequests Off
  ProxyPreserveHost On
  ProxyVia Full
 
  <Proxy *>
      Require all granted
  </Proxy>

  ProxyPass /api/  http://127.0.0.1:7200/
  ProxyPassReverse / http://127.0.0.1:7200/
</VirtualHost>

But that hasn't seemed to work. Basically I want the www.spidercartographers.co.uk:7200 to instead to be called through www.spidercartographers.co.uk/api

excuse the pun in the name of web based map makers

Philip09
  • 21
  • 2

0 Answers0