Cross Domain Embeds
If you are using Know's cloud managed service and wish to serve Knowi on your page served from your own domain to avoid any modern browser crossdomain errors, you can add a proxy inside your domain to forward the traffic to Knowi.
While there are a number of ways to achieve this, we will use the forever popular apache web server in this post:
Throughout this document, we will assume the following
- Your domain is example.com
- You want to forward all requests to https://proxy.example.com to https://www.knowi.com
- You have access to your SSL private.key, cert.crt, and optionally intermediate.crt for your example.com domain.
Setting up apache web server:
- Install httpd on your server using any kind of package management if available or manually from https://httpd.apache.org/docs/current/install.html. For example, using yum:
sudo yum install -y httpd
2. Similarly, install mod_ssl for httpd and openssl using package management or manually http://www.modssl.org/example/. For example:
sudo yum install mod_ssl openssh
3. Edit /etc/httpd/conf/httpd.conf file to add the following:
<VirtualHost *:443>
ServerName proxy.example.com
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLEngine On
SSLCertificateFile /path/to/file/cert.crt
SSLCertificateKeyFile /path/to/file/private.key
SSLCertificateChainFile /path/to/file/intermediate.crt
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyRequests On
ProxyPreserveHost Off
ProxyPass / https://www.knowi.com/
</VirtualHost>
4. Restart httpd.
sudo systemctl restart httpd
Please sign in to leave a comment.
0 comments