-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can enable ssl ? #12
Comments
i too may require SSL in my project. Since this is based on workerman, i'm looking at this link from workerman github page. |
I ended up using nginx with reverse proxy to localhost mark workers, reason being:
so my workers are running at http://localhost:3000
|
Please correct me if I'am wrong but, mark is based on workerman and workerman supports SSL --- start.php 2021-08-24 12:20:47.752143969 +0200
+++ start-ssl.php 2021-08-24 15:04:36.983849892 +0200
@@ -3,7 +3,19 @@
require 'vendor/autoload.php';
-$api = new App('http://0.0.0.0:3000');
+// SSL context.
+$context = array(
+ 'ssl' => array(
+ 'local_cert' => '/path/to/server.crt',
+ 'local_pk' => '/path/to/server.key',
+ 'verify_peer' => false,
+ )
+);
+
+
+$api = new App('http://0.0.0.0:3000', $context);
+
+$api->transport = 'ssl'; |
I prefer to use Nginx as Proxy, to manage SSL, static files, ... But the Nginx configuration of @iprastha , is not very good for performance. A correct Nginx config, have a very big difference in performance. It's better so:
This is the minimal config, and using http 1.1 in the proxy connection. Later there are more options: use Unix socket, load balancer, client keepalive, ... |
Thank you for the review, upon further reading, this nginx setting is to ensure keepalive connection is used on the upstream server. More info on https://www.nginx.com/blog/tuning-nginx/ under "Keepalive Connections" section. Quoting
|
How is ssl enabled in this framework?
The text was updated successfully, but these errors were encountered: