https?

When you build a Web Application the IDE usually sets up the server to run on port 80.
However what must be done such that your application is accessed by https on port 443?

See here: http://developer.xojo.com/standalone-ssl

Thanks Travis. Very helpful.
I’m curious about the command line parameters that are in that document.
Does my application need to parse the command line and do something with these parameters or are these known to the xojo web app itself?

Those parameters are known to the Xojo web app.

The documentation I was pointed to states that there are 3 files that need to be concatenated together.
However the illustration only shows 2 files concatenated together.

instuctions:

Certificate
CABundle
Private Key

illustration:

BEGIN CERTIFICATE-----
BEGIN RSA PRIVATE KEY-----

Where does the CABundle go?

In that order. A CABundle isn’t always present from a cert provider- but if it is, it goes in after your Certificate as mentioned above.

Please add it to the documentation, that would make it more clear for everyone.

This isn’t working for me.

$openssl genrsa -out server.key 2048

$openssl req -new -key server.key -out server.csr
Country Name (2 letter code) [AU]:CA
State or Province Name (full name) [Some-State]:AB
Locality Name (eg, city) []:Calgary
Organization Name (eg, company) [Internet Widgits Pty Ltd]:bob inc
Organizational Unit Name (eg, section) []:disorg
Common Name (e.g. server FQDN or YOUR name) []:myhost.mydomain.local
Email Address []:bob@mydomain.com

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:foobar
An optional company name []:bob inc

$cp server.key server.key.org
$openssl rsa -in server.key.org -out server.key
writing RSA key
$openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=CA/ST=AB/L=Calgary/O=bob inc/OU=disorg/CN=myhost.mydomain.local/emailAddress=bob@mydomain.com
Getting Private key
$cat server.crt server.key >sslapp.crt
$pwd
/Users/bob/xojo_server_ssl

$cd tosslapp
$ sudo ./sslapp --Secureport=8081 --Certificate=/Users/bob/xojo_server_ssl/sslapp.crt --ssltype=TLSv2

I open up chrome and navigate to:

https://myhost.mydomain.local:8081

I get nothing. Timeout
This site can’t be reached

however!
http://localhost

Gives my my web page.

What version of Xojo are you using Brian?

Also, make sure there’s a line ending between the two certs in the file.

It is.

[quote=259413:@Greg O’Lone]What version of Xojo are you using Brian?

Also, make sure there’s a line ending between the two certs in the file.[/quote]

I’m using 2016R1

=====

or
=====

adding cr/lf didn’t make any difference.
Still not working.

p.s.
Mac OS X 10.11.4
Xojo 2016R1

Are you connecting locally or in a server?

Does your firewall allow connections on port 443?

Is there another service already using port 443?

Can you be more specific as to what “it doesn’t work” means in this case?

My server is running on the same machine I am testing on.
I have no other servers running on my 443 port.
(Normally if there is another server on the port before you launch the server there will be an error message about there being a port conflict)

I have tried https://localhost
i have tried https://myhost.mydomain.local

I get nothing. Timeout
This site can’t be reached

Anything in the log (Console.app), when you launch your app?

[quote=259796:@Brian O’Brien]My server is running on the same machine I am testing on.
I have no other servers running on my 443 port.
(Normally if there is another server on the port before you launch the server there will be an error message about there being a port conflict)

I have tried https://localhost
i have tried https://myhost.mydomain.local

I get nothing. Timeout
This site can’t be reached[/quote]

Which OS are you trying all that under ?

Although I have regularly used Mac and Windows to set up localhost, I do not remember ever seeing methods to enable SSL locally without the help of a server software, for instance Wamp which puts Apache on your machine.
You can download Wamp from http://apache.org
http://blog.facilelogin.com/2008/07/enabling-ssl-on-wamp.html

I also used successfully MAMP https://www.mamp.info/
http://www.hongkiat.com/blog/localhost-ssl-using-mamp/

It is possible that the certificate installation you did works, but only when the app is accessed from another workstation on the same network. Here, I routinely access Xojo web apps running on the Mac from the PC or a tablet by going to http://192.168.1.38:8080

You may want to try that on your machine address on the network. It is found in the network preferences on Mac, or in detail in the network center on PC.

I’ve moved my app to work from home.
Regenerated the crt file.
The hostname is not a fully qualified domain name it’s just the host name of the computer. MicMac

Pretty sure I’ve never had any issues with the firewall but I’lll turn it off.

Does the application identifier com.brianobrien.sslapp in the project build have anything to do with this?

I get the same response from a different server on the same vlan.

In the build settings the port is set to 8080 however the command line -Secureport is 8081

Both machines can access the site over port 8080 using just http.

telnet MicMac.local 8080 (gets a connection)
telnet MicMac.local 8081 (connection refused)

There is nothing in the console. No errors nothing.

Has anyone hosted a Xojo web application on a mac that is accessed by https and had it work for them?

Yes. All my client web sites are running stock Ubuntu 15 with a standalone Xojo WebApp accessed through https via port 443. For example:

https://demo.securitydialog.com

Sorry, no logon for you!