Plesk

.html files of a website show a blank page page when Apache PageSpeed module is enabled on a Plesk server

Symptoms

Cause

Apache PageSpeed module prevents static files from being served correctly.

Resolution

Apply one of the following solutions:

 

Solution 1: Disable smart static files processing by nginx

 

For best experience, Apache PageSpeed recommends to have static files processed by Apache. To enable this setting, follow the steps:

 

Disabling smart static files processing via Plesk

  1. Go to Domains > example.com > Apache & nginx Settings and disable the option Smart static files processing.

  2. Click OK to apply the changes.

    Note: It is not possible to manage this option via service plan settings.

 

To disable smart static files processing by nginx for all newly created domains, apply the following steps:

  1. Connect to the server via SSH.

  2. Create the sh script with any text editor, for example:

    # vi /usr/local/psa/bin/script.sh

  3. Add the following lines in the script:

    #!/bin/bash
    echo "starting" >> /tmp/event_handler.log
    plesk bin subscription --update-web-server-settings ${NEW_DOMAIN_NAME} -nginx-transparent-mode true
    echo "added ${NEW_DOMAIN_NAME}" >> /tmp/event_handler.log

  4. Make it executable:

    # chmod 755 /usr/local/psa/bin/script.sh

  5. Go to Tools & Settings > Event Manager > Add Event Handler

  6. Choose "Physical hosting created" as an event and put the following command in the "Command" field:

    # sh /usr/local/psa/bin/script.sh

  7. Click OK. From now on, all newly created domains will have this option disabled.

 

 

Disabling smart static files processing via a command-line interface

Connect to the server via SSH and disable Smart static files processing using the following command:

  • For a domain:

    # plesk bin subscription --update-web-server-settings example.net -nginx-transparent-mode true

  • For all domains:

    # for subs in `plesk bin site --list`; do echo Processing subscription... $subs; plesk bin subscription --update-web-server-settings $subs -nginx-transparent-mode true; done

 

Solution 2: Turn off Apache PageSpeed module

 

If Smart static files processing must remain enabled, turn off Apache PageSpeed module so that it does not interfere with static files processing:

 

Turning off Apache PageSpeed module via Plesk

  1. Go to Tools & Settings > Apache Web Server.

  2. Uncheck pagespeed (and pagespeed_ap24 if enabled) and click OK.

 

Turning off Apache PageSpeed module via a command-line interface

  1. Connect to the Plesk server via SSH.

  2. Disable Apache mod_pagespeed:

    • on CentOS/RHEL-based distributions

      # mv /etc/httpd/conf.d/pagespeed.conf /etc/httpd/conf.d/pagespeed…

Exit mobile version