We are using Open edX powered by Bitnami on AWS Cloud Ironwood release.
What we want is to use a subdomain such as:
studio.example.com
instead of something like:
lms.example.com:18010
to access edX Studio.
Four important files:
- ~/apps/edx/conf/httpd-vhosts.conf
- ~/apps/edx/conf/httpd-lms.conf
- ~/apps/edx/conf/lms.env.json
- ~/apps/edx/conf/cms.env.json
In file ~/apps/edx/conf/httpd-vhosts.conf
Configure the virtual host for the LMS:
<VirtualHost *:80> ServerName lms.example.com # ServerAlias * Include “/opt/bitnami/apps/edx/conf/httpd-lms.conf”</VirtualHost>
Turn off the virtual host listening on 18010:
# Listen 18010# <VirtualHost *:18010># Include “/opt/bitnami/apps/edx/conf/httpd-cms.conf”# </VirtualHost>
Configure a virtual host for the CMS/Studio:
<VirtualHost *:80> ServerName studio.example.com Include “/opt/bitnami/apps/edx/conf/httpd-cms.conf”</VirtualHost>
Turn of rewriting of lms.example.com/edx-studio to lms.example.com:18010 in file ~/apps/edx/conf/httpd-lms.conf:
# Enable some basic redirections# RewriteEngine On# RewriteRule ^/edx-studio(/.*)? http://%{SERVER_NAME}:18010/ [R,L]
Go to file ~/apps/edx/conf/lms.env.json and make the appropriate changes:
“CMS_BASE”: “studio.example.com”“LMS_BASE”: “lms.example.com”“LMS_INTERNAL_ROOT_URL”: “http://lms.example.com",“LMS_ROOT_URL”: “http://lms.example.com",“LOGIN_REDIRECT_WHITELIST”: [ “studio.example.com” ]“SESSION_COOKIE_DOMAIN”: “.example.com”
Go to file ~/apps/edx/conf/cms.env.json and make the appropriate changes:
“CMS_BASE”: “studio.example.com”“LMS_BASE”: “lms.example.com”“LMS_INTERNAL_ROOT_URL”: “http://lms.example.com",“LMS_ROOT_URL”: “http://lms.example.com",“LOGIN_REDIRECT_WHITELIST”: [ “studio.example.com” ]“SESSION_COOKIE_DOMAIN”: “.example.com”
Restart services:
$ sudo /opt/bitnami/ctlscript.sh restart apache$ sudo /opt/bitnami/ctlscript.sh restart edx
And we’re done!
To continue and set up HTTPS on your Open edX installation have a look at this article.