• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Static Content intermittantly not being served

WindowsSysadmin

New Pleskian
Hi All,

We are running Plesk Onyx 17 on Windows server 2016 with IIS10 - and as per the attached image, we are getting intermittent issues where Static Content fails to load. If we reload the page, most times the images load successfully.

I have seen this issue before on a Server 2012 instance - the fix in that scenario was to add this to the web.config file:

Code:
<system.Webserver>
<staticContent>
<clientCache cacheControlMode="NoControl" />
</staticContent>
</system.Webserver>

I've done the above (and also tried setting it to disablecache) but to no avail - I suspect that either the issue is that I'm missing an additional place to add said config, or I need to do something within Plesk to make it honor the above setting.

Ideas?
 

Attachments

  • StaticContent.png
    StaticContent.png
    53.8 KB · Views: 10
I worked with Plesk support on this - eventually
I tracked the issue down to our Plesk install script (which is written in Powershell) – We enabled Dynamic IP security for the server, and this is what has caused this issue

To replicate:

Code:
Import-Module webadministration

Set-WebConfiguration -filter 'system.webServer/security/dynamicipsecurity/*' -PSPath "IIS:\" -value (@{enabled="true"})

Set-WebConfiguration -filter 'system.webServer/security/dynamicipsecurity' -PSPath "IIS:\" -value (@{denyAction="AbortRequest"})

As soon as I did this section – the issue occurred – I believe the culprit (and why it was intermittent) was due to the time taken by the server to serve the content (the server is a VM) – if the VM IO was fast enough, the default settings for Dynamic IP Security would trip and fail to serve the content – I tried to find this in the logs, but it doesn’t appear anywhere (which is what made tracking this fault down such a Pain)

The solution was to disable Dynamic IP Security for the Plesk Control Panel website using the below Powershell:

Code:
set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -location 'pleskcontrolpanel' -filter "system.webServer/security/dynamicIpSecurity/denyByConcurrentRequests" -name "enabled" -value "false"


set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -location 'pleskcontrolpanel' -filter "system.webServer/security/dynamicIpSecurity/denyByRequestRate" -name "enabled" -value "false"
 
Back
Top