>>> On Sat, Apr 28, 2018 at 09:39:56AM -0400, David Higgs wrote:
>>>> - unifi running https on port 8443

FWIW unifi is a bit fussy about http. I'm front-ending it with nginx
and needed a few extras to have it working properly

    proxy_redirect default;
    proxy_set_header Host $host;            # needed for chrome to login
    proxy_http_version 1.1;                 # websockets
    proxy_set_header Upgrade $http_upgrade; # websockets
    proxy_set_header Connection "upgrade";  # websockets

If you have problems getting it to work woth relayd and give up, you
can use your own cert like this:

certdir=/path/to/certs
PATH=/usr/local/jdk-1.8.0/bin:/usr/local/jdk-1.7.0/bin:$PATH
rcctl stop unifi
cd /usr/local/share/unifi/data
umask 077
openssl pkcs12 -export -in $certdir/cert.pem -inkey $certdir/privkey.pem 
-certfile $certdir/chain.pem -out unifi.p12 -name unifi -password 
pass:aircontrolenterprise
keytool -importkeystore -srckeystore unifi.p12 -srcstoretype PKCS12 
-srcstorepass aircontrolenterprise -destkeystore keystore.new -storepass 
aircontrolenterprise && (mv keystore keystore.old; mv keystore.new keystore)
rm unifi.p12
chown _unifi:wheel keystore*
rcctl start unifi


Reply via email to