How to Set SSL for Standalone Web Apps in my localhost

Hi All,

I hope all are safe and healthy from this COVID-19 pandemic.

When I lunch my web application from XOJO it opening in HTTP (For sample:http://127.0.0.1:8080/”) by default settings, however, I would like to run my web application on SSL. So it should lunch in https (For sample:https://127.0.0.1:8081/”)

I have tried to change the shared build settings, Please see the below screenshot for your reference. Can anyone please let me know if I miss anything.

Screenshot Link: link text

Thanks,
Prakash

The image is not available.

Hi @Alberto DePoo - Kindly check the screenshot link. Please let me know if still facing any issue.
link text

Both say the same “That page doesn’t exist”

Edit: did you put a timeout on your uploaded image?

Please check my second reply and it has a link. It is working.

Here is the image:

Are you trying the Examples - Web - SSL - SSLTest project? or have you make it work before trying to make your code use SSL?

@Alberto DePoo Thanks for your quick response. I have my own project. I didn’t try any examples. I would like to run my project in SSL while debugging as well. I am trying for the first time.

Ok, let me rephrase: first try to run the Example, I can help you with that, once you successfully make it work you would understand what is needed.

Just remember that you can’t get a valid SSL cert for localhost. Are you on mac or windows?

Thanks for your input. I will try with SSL examples and keep you posted on my observation. I am using Windows OS.

The main steps to make the SSLTest example are:

  • new project, load example
  • go to build settings and uncheck Xojo Cloud and check Windows
  • change the Windows App Name (selecting Windows build settings) to SSLTest.exe
  • build as standalone

If you execute the app, you will be able to connect to localhost:8081 to make port 8082 work with SSL then you need to execute ./SSLTest.exe --secureport=8082

You then will be able to connect to localhost 8081 with http and 8082 with https (you will receive a warning that the site is not a secure site because of the fake certificate).

Once you make this work, you can test the same with your app. You just need to change the SSLTest.cert name to match your application name and put it next to your app.

I would start with reading the documentation on Web App Deployment.

Thanks Alberto DePoo. I made it using IIS as well. It’s working perfectly.

just for curiosity, Is there a comprehensive guide on how to host this web app in the VPS server using SSL?

If you want to do the work on your own, @Tim Parnell put a guide using a droplet and CentOS Linux. Some people may want to use Ubuntu and others Windows. Each platform has its differences.

Xojo Cloud (can’t link to that page directly, so go to https://www.xojo.com/store/ and click the Cloud icon for more information) offers the installation, maintenance and easy way to deploy your Xojo web apps.

Thanks, @Alberto - I know VPS will take care of all settings related to SSL and for me just will have to just push the package. It’s been a long time so that why I am getting little bit confused about XOJO deployment.

@Tim Parnell: Very handy information. Thanks again.