# vi /edx/app/nginx/sites-available/lms
upstream apache-lms-backend { server 127.0.0.1:8443 fail_timeout=0; } server { location @proxy_to_apache_lms { proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header X-Forwarded-Port $http_x_forwarded_port; proxy_set_header X-Forwarded-For $http_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass https://apache-lms-backend; } # pass /Shibboleth.sso on to apache location /Shibboleth.sso { try_files $uri @proxy_to_apache_lms; } # pass shib-login on to apache location ~ ^/shib-login/?$ { try_files $uri @proxy_to_apache_lms; } } |
# vi /etc/apache2/sites-available/default
# Shibboleth WSGIPythonHome /edx/app/edxapp/venvs/edxapp WSGIRestrictEmbedded On <VirtualHost *:8443> Servername https://edx.example.com SSLEngine On SSLCertificateFile ???.crt SSLCertificateKeyFile ???.key SSLCertificateChainFile ???.crt SetEnv SERVICE_VARIANT lms WSGIScriptAlias / /edx/app/edxapp/edx-platform/lms/wsgi_apache_lms.py <Directory /edx/app/edxapp/edx-platform/lms> <Files wsgi_apache_lms.py> Order deny,allow Allow from all </Files> </Directory> <Location /Shibboleth.sso> SetHandler shib Satisfy Any Allow from all AuthType None Require all granted </Location> <Location '/shib-login'> AuthType shibboleth ShibRequestSetting requireSession 1 require valid-user </Location> WSGIDaemonProcess lms user=www-data group=adm processes=1 python-path=/edx/app/edxapp/edx-platform:/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages display-name=%{GROUP} WSGIProcessGroup lms WSGIApplicationGroup %{GLOBAL} ErrorLog /var/log/apache2/apache-edx-error.log LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %D" apache-edx CustomLog /var/log/apache2/apache-edx-access.log apache-edx </VirtualHost> |