HTTPS/SSL with Apache

From Mayan EDMS Wiki
Jump to: navigation, search

Instruction to create an Apache 2 named virtualhost on Ubuntu 18.04

  • Create a DNS entry to point at your domain. This example uses, change that to a real domain you control.
  • Create an Apache virtualhost by creating the file /etc/apache2/sites-available/001-mayan-edms.conf
    	ProxyPass / http://localhost:8000/
  • Test the configuration
    sudo apache2ctl configtest
  • Enable the Apache site for Mayan
    a2ensite 001-mayan-edms.conf
    sudo systemctl reload apache2
  • Install Certbot
    sudo add-apt-repository ppa:certbot/certbot
    sudo apt install python-certbot-apache
  • Execute certbot
    sudo certbot --apache -d
  • A new apache site should have been created at /etc/apache2/sites-available/001-mayan-edms-le.conf and the previous site file edited to add a redirect.
  • Edit Mayan's supervisor file and change this line

to this:

    MAYAN_ALLOWED_HOSTS='["localhost", "", "[::1]"]',
  • Restart Mayan
    sudo systemctl restart supervisor
  • Test the HTTPS support, visit.