Keywords: OpenEdX - Microsoft Azure - Technical issue - Domain Name (DNS)
bnsupport ID: e1ae5642-23ae-61f8-d7be-99953f66ba57
Description:
Hi Bitnamier,
Issue: when login from studio i got redirected to lms dashboard instead of cms home
Target: after login from studio to be redirected to cms home to start content editing.
I have configured a custom domain mapping by edit both lms.env.json
and cms.env.json
as following:
"CMS_BASE": "studio.customdomain.io",
"LMS_BASE": "edx.customdomain.io",
"SITE_NAME": "edx.customdomain.io",
I have edited httpd-lms.conf
as following
RewriteEngine On
RewriteCond "%{HTTP_HOST}" "^.*studio\.customdomain\.io" [NC]
RewriteRule ^/(.*)$ http://127.0.0.1:18010/$1 [P]
ProxyPassReverse "/" "http://127.0.0.1:18010/"
Also i have edited httpd-vhosts.conf
as following
<VirtualHost *:80>
ServerName edx.customdomain.io
ServerAlias *
<IfModule mod_proxy.c>
ProxyPass /.well-known !
</IfModule>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^localhost
RewriteCond %{HTTP_HOST} !^[0-9]+.[0-9]+.[0-9]+.[0-9]+(:[0-9]+)?$
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteCond %{HTTP_HOST} !^localhost
RewriteCond %{HTTP_HOST} !^[0-9]+.[0-9]+.[0-9]+.[0-9]+(:[0-9]+)?$
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^(.*)$ http://%1$1 [R=permanent,L]
Include "/opt/bitnami/apps/edx/conf/httpd-lms.conf"
<Location /.well-known>
<IfModule mod_proxy.c>
ProxyPass !
</IfModule>
</Location>
</VirtualHost>
<VirtualHost *:443>
ServerName edx.customdomain.io
ServerAlias *
SSLEngine on
SSLCertificateFile "/opt/bitnami/apache2/conf/edx.customdomain.io.crt"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/edx.customdomain.io.key"
<IfModule mod_proxy.c>
ProxyPass /.well-known !
</IfModule>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteCond %{HTTP_HOST} !^localhost
RewriteCond %{HTTP_HOST} !^[0-9]+.[0-9]+.[0-9]+.[0-9]+(:[0-9]+)?$
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^(.*)$ https://%1$1 [R=permanent,L]
Include "/opt/bitnami/apps/edx/conf/httpd-lms.conf"
<Location /.well-known>
<IfModule mod_proxy.c>
ProxyPass !
</IfModule>
</Location>
</VirtualHost>
Listen 18010
<VirtualHost *:18010>
ServerName studio.customdomain.io
ServerAlias *
Include "/opt/bitnami/apps/edx/conf/httpd-cms.conf"
</VirtualHost>