wiki:SamlSP2021/Agenda/WebappsSso

Version 1 (modified by admin, 3 years ago) ( diff )

--

Configuring Shibboleth SP on Single server Multi virtual host environment

This will guide you through installing Shibboleth Service Provider setup on Ubuntu 20.04 LTS server with Apache2 running as the web server. We will also look into configuring multiple apache virtual hosts and configuring them for SSO login of two different web apps; Wordpress and Moodle.

Requirements

  • Linux Server running Ubuntu 20.04 LTS
  • Apache installed with two different virtual hosts.
  • SSL/ HTTPS Certificates issued ( May be using Letsencrypt or Otherwise)
  • Installed Wordpress and Moodle latest editions on above created virtual hosts.

Apache Config recap

Wordpress Apache Config

http config: /etc/apache2/sites-enabled/wp.conf

<VirtualHost *:80>

	ServerName wp.Your-Domain
	ServerAdmin you@yourwebsite.com
	DocumentRoot /var/www/html #Location of Wordpress installation

	ErrorLog ${APACHE_LOG_DIR}/wp-error.log
	CustomLog ${APACHE_LOG_DIR}/wp-access.log combined

	
        RewriteEngine on
        RewriteCond %{SERVER_NAME} =wp.Your-Domain
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] # port 80 -- > 443 redirection
</VirtualHost>

https config: /etc/apache2/sites-enabled/wp-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
	
	ServerName wp.Your-Domain
	ServerAdmin you@yourwebsite.com
	DocumentRoot /var/www/html #Location of Wordpress installation

	ErrorLog ${APACHE_LOG_DIR}/wp-error.log
	CustomLog ${APACHE_LOG_DIR}/wp-access.log combined

        #SSL Certificates issued by letsencrypt
        SSLCertificateFile /etc/letsencrypt/live/wp.Your-Domain/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/wp.Your-Domain/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

Moodle Apache Config

http config: /etc/apache2/sites-enabled/mdl.conf

<VirtualHost *:80>

	ServerName mdl.Your-Domain
	ServerAdmin you@yourwebsite.com
	DocumentRoot /var/www/mdl #Location of Moodle installation

	ErrorLog ${APACHE_LOG_DIR}/mdl-error.log
	CustomLog ${APACHE_LOG_DIR}/mdl-access.log combined

	
        RewriteEngine on
        RewriteCond %{SERVER_NAME} =mdl.Your-Domain
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] # port 80 -- > 443 redirection
</VirtualHost>

https config: /etc/apache2/sites-enabled/mdl-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
	
	ServerName mdl.Your-Domain
	ServerAdmin you@yourwebsite.com
	DocumentRoot /var/www/mdl #Location of Moodle installation

	ErrorLog ${APACHE_LOG_DIR}/mdl-error.log
	CustomLog ${APACHE_LOG_DIR}/mdl-access.log combined

        #SSL Certificates issued by letsencrypt
        SSLCertificateFile /etc/letsencrypt/live/mdl.Your-Domain/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/mdl.Your-Domain/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Note: See TracWiki for help on using the wiki.