Hi,
I have fixed the problem with the following solution:
1, use Apache2 and jwchat to pull out ejabberd at its port 5280 and giving out at port 8800.
2, use Squid to proxy Apache's 8800 and giving out at port 8892 with SSL.
3, use ipfw forward port 443 to port 8892.
Now when you go
It worked without any problems for serveral weeks.