1

I want to use SSL for nodejs to secure socketio communication, so I need to use SSL for both apache and node.

In order to have ability to share cookie between php and node, I have to use same domain name .

but if I can not use 443 for same domain that uses both nodejs and php same time.

how can I solve this problem

Ata
  • 12,126
  • 19
  • 63
  • 97

1 Answers1

0

Use a reverse proxy such as haproxy to proxy requests to either Apache or node.

For the actual sharing of sessions between node and PHP (via redis) see this answer.

Community
  • 1
  • 1
mscdex
  • 104,356
  • 15
  • 192
  • 153
  • when a user want to request XXXXX.com:443 , how haproxy want to know should it be for node or apache ? – Ata Jun 09 '14 at 05:01
  • You can use any criteria you want. It could be based on the requested path, an HTTP header that's present, etc. – mscdex Jun 09 '14 at 12:02