Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#814859
Good afternoon,

I was wondering if there any way that I can show a "maintenance page" to the clients while I am upgrading the processmaker?

For example, when I do the upgrade of ProcessMaker on the server, users will redirect to a "maintenance.html" page.

Is it possible to do that? :shock:

Thanks,
Yuan
#814909
There is no easy way to do this inside ProcessMaker (without screwing up lots of code). I recommend changing Apache's virtualhost definition in your pmos.conf file to point to a custom path.

Create the file /opt/maintenance/index.html with the message "Site under Maintenance!"
Make sure that that file is publicly readable and the /maintenance/ directory is executable if using Linux.

Then, change the pmos.conf file from something like:
Code: Select all
<VirtualHost *>
    DocumentRoot /opt/pm3.2.2e/workflow/public_html
    DirectoryIndex index.html index.php

    <Directory /opt/pm3.2.2e/workflow/public_html>
        ErrorDocument 503 /index.html
        ErrorDocument 404 /index.html
        Options Indexes FollowSymLinks MultiViews
        AddDefaultCharset UTF-8
        AllowOverride None
        Require all granted
        ExpiresActive On

        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]
        </IfModule>
        AddOutputFilterByType DEFLATE text/html
    </Directory>
</VirtualHost>
To:
Code: Select all
<VirtualHost *>
    #DocumentRoot /opt/pm3.2.2e/workflow/public_html
    DocumentRoot /opt/maintenance
    DirectoryIndex index.html index.php

    #<Directory /opt/pm3.2.2e/workflow/public_html>
    <Directory /opt/maintenance> 
        ErrorDocument 503 /index.html
        ErrorDocument 404 /index.html
        Options Indexes FollowSymLinks MultiViews
        AddDefaultCharset UTF-8
        AllowOverride None
        Require all granted
        ExpiresActive On

        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]
        </IfModule>
        AddOutputFilterByType DEFLATE text/html
    </Directory>
</VirtualHost>
Then restart Apache (or reboot) and it should now work.
#814910
amosbatto wrote: Tue Jun 26, 2018 1:15 am There is no easy way to do this inside ProcessMaker (without screwing up lots of code). I recommend changing Apache's virtualhost definition in your pmos.conf file to point to a custom path.

Create the file /opt/maintenance/index.html with the message "Site under Maintenance!"
Make sure that that file is publicly readable and the /maintenance/ directory is executable if using Linux.

Then, change the pmos.conf file from something like:
Code: Select all
<VirtualHost *>
    DocumentRoot /opt/pm3.2.2e/workflow/public_html
    DirectoryIndex index.html index.php

    <Directory /opt/pm3.2.2e/workflow/public_html>
        ErrorDocument 503 /index.html
        ErrorDocument 404 /index.html
        Options Indexes FollowSymLinks MultiViews
        AddDefaultCharset UTF-8
        AllowOverride None
        Require all granted
        ExpiresActive On

        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]
        </IfModule>
        AddOutputFilterByType DEFLATE text/html
    </Directory>
</VirtualHost>
To:
Code: Select all
<VirtualHost *>
    #DocumentRoot /opt/pm3.2.2e/workflow/public_html
    DocumentRoot /opt/maintenance
    DirectoryIndex index.html index.php

    #<Directory /opt/pm3.2.2e/workflow/public_html>
    <Directory /opt/maintenance> 
        ErrorDocument 503 /index.html
        ErrorDocument 404 /index.html
        Options Indexes FollowSymLinks MultiViews
        AddDefaultCharset UTF-8
        AllowOverride None
        Require all granted
        ExpiresActive On

        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]
        </IfModule>
        AddOutputFilterByType DEFLATE text/html
    </Directory>
</VirtualHost>
Then restart Apache (or reboot) and it should now work.
Hi Amo,

Cool, thanks for the solution.

Regards,
Yuan

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]