2019-10-24

Setting up SSL.

I know from watching some of the videos you can start the server using port 443 but, I have not see anywhere to setup a SSL key from like lets encrypt or something like that. I have it running locally on my imac but the goal is to run it on my own webpage. Can you point my in a direction wheere I can do that?
Thank you, Peter Gruessing
I know from watching some of the videos you can start the server using port 443 but, I have not see anywhere to setup a SSL key from like lets encrypt or something like that. I have it running locally on my imac but the goal is to run it on my own webpage. Can you point my in a direction wheere I can do that? Thank you, Peter Gruessing

-- Setting up SSL
Hi Peter,
If you are running Yioop under a separate web server you would do the SSL configuration in that web server. If you are using Yioop as its own web server, then you can define a server context in the file src/configs/LocalConfig.php (you have to create if it doesn't already exist). For example, this file might contain:
 <?php
 nsdefine('SERVER_CONTEXT', ['ssl' => [
    'local_cert' => '/etc/ssl/certs/my-cert.crt',
    'cafile' => '/etc/ssl/certs/cert_authority.crt',
    'capath' => '/etc/ssl/certs',
    'local_pk' => '/etc/ssl/private/my-cert.key',
    'allow_self_signed' => false,
    'verify_peer' => false,
    ],
    'SERVER_NAME' => 'my-server.com',
    'SERVER_SOFTWARE' => 'My Server Software',
    'SERVER_ADMIN' => me@myself-and-I.org',
    'CONNECTION_TIMEOUT' => 10,
 ]);
Given the above you could then start Yioop on port 443.
Hi Peter, If you are running Yioop under a separate web server you would do the SSL configuration in that web server. If you are using Yioop as its own web server, then you can define a server context in the file src/configs/LocalConfig.php (you have to create if it doesn't already exist). For example, this file might contain: <?php nsdefine('SERVER_CONTEXT', ['ssl' => [ 'local_cert' => '/etc/ssl/certs/my-cert.crt', 'cafile' => '/etc/ssl/certs/cert_authority.crt', 'capath' => '/etc/ssl/certs', 'local_pk' => '/etc/ssl/private/my-cert.key', 'allow_self_signed' => false, 'verify_peer' => false, ], 'SERVER_NAME' => 'my-server.com', 'SERVER_SOFTWARE' => 'My Server Software', 'SERVER_ADMIN' => me@myself-and-I.org', 'CONNECTION_TIMEOUT' => 10, ]); Given the above you could then start Yioop on port 443.

-- Setting up SSL
okay thanks for the quick response! I will try that. We sent in a donation love the software so far! Have you ever considered adding email capabilities for the users? So they can have email at our search sites also? Id be willing to donate quite a large donation. :)
okay thanks for the quick response! I will try that. We sent in a donation love the software so far! Have you ever considered adding email capabilities for the users? So they can have email at our search sites also? Id be willing to donate quite a large donation. :)

-- Setting up SSL
so i have a linux server running with all the php preeqs done. Running apache with a cert from letencryot. So i just put the files in the main /var/www/ directory un pack the mand start yoop on port 443 and we good?
so i have a linux server running with all the php preeqs done. Running apache with a cert from letencryot. So i just put the files in the main /var/www/ directory un pack the mand start yoop on port 443 and we good?
X