Gzip on Azure Webapps












1















I've a problem with gzip in my Azure Webapps. I'm using Wordpress (my domain is https://www.uc.ac.id) and using Windows OS base for my Webapps.



I can't enable gzip compression in my site. I was tried so many ways to enable it (with add compression on my web.config and application.xdt) but it's not working after i check in https://checkgzipcompression.com, the gzip is not enabled.



Please help me.



There is my web.config



 <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<pages enableSessionState="false" />
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<remove name="X-Powered-By" />
<add name="X-Frame-Options" value="SAMEORIGIN" />
<add name="X-Xss-Protection" value="1; mode=block" />
<add name="X-Content-Type-Options" value="nosniff" />
<add name="Referrer-Policy" value="no-referrer" />
</customHeaders>
<redirectHeaders>
<clear />
</redirectHeaders>
</httpProtocol>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="15000000" />
<denyUrlSequences>
<add sequence="xmlrpc.php" />
</denyUrlSequences>
</requestFiltering>
<dynamicIpSecurity denyAction="Forbidden">
<denyByConcurrentRequests enabled="true" maxConcurrentRequests="10" />
<denyByRequestRate enabled="true" maxRequests="15" requestIntervalInMilliseconds="2000" />
</dynamicIpSecurity>
</security>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="31.00:00:00" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="font/woff" />
</staticContent>
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
<rewrite>
<rules>
<rule name="ProxyAdmin" stopProcessing="true">
<match url="developer-academy(.*)" />
<action type="Rewrite" url="https://ucappleacademy.azurewebsites.net/{R:1}" logRewrittenUrl="false" />
</rule>
<rule name="Redirect rquests to default azure websites domain" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^semeru.azurewebsites.net$" />
</conditions>
<action type="Redirect" url="https://www.uc.ac.id/{R:0}" />
</rule>
<rule name="WordPress: https://www.uc.ac.id" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


and this is my application.xdt



    <?xml version="1.0"?>  
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<proxy xdt:Transform="InsertIfMissing" enabled="true" preserveHostHeader="false" reverseRewriteHostInResponseHeaders="false" />
<httpCompression>
<dynamicTypes>
<add mimeType="application/json;charset=utf-8" enabled="true" xdt:Transform="InsertAfter(/configuration/system.webServer/httpCompression/dynamicTypes/add[(@mimeType='application/json')])" />
</dynamicTypes>
</httpCompression>
</system.webServer>
</configuration>









share|improve this question























  • should be enabled by default, try removing urlCompression element from your config.

    – Ken W MSFT
    Nov 26 '18 at 19:02











  • hellow @KenWMSFT i've already remove it and remove http compression on my application,xdt. But if you see on checkgzipcompression.com/?url=https%3A%2F%2Fwww.uc.ac.id it;s showing the gzip is not enabled, but the presentage is shown.

    – Nugroho Raharjo
    Nov 27 '18 at 8:08
















1















I've a problem with gzip in my Azure Webapps. I'm using Wordpress (my domain is https://www.uc.ac.id) and using Windows OS base for my Webapps.



I can't enable gzip compression in my site. I was tried so many ways to enable it (with add compression on my web.config and application.xdt) but it's not working after i check in https://checkgzipcompression.com, the gzip is not enabled.



Please help me.



There is my web.config



 <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<pages enableSessionState="false" />
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<remove name="X-Powered-By" />
<add name="X-Frame-Options" value="SAMEORIGIN" />
<add name="X-Xss-Protection" value="1; mode=block" />
<add name="X-Content-Type-Options" value="nosniff" />
<add name="Referrer-Policy" value="no-referrer" />
</customHeaders>
<redirectHeaders>
<clear />
</redirectHeaders>
</httpProtocol>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="15000000" />
<denyUrlSequences>
<add sequence="xmlrpc.php" />
</denyUrlSequences>
</requestFiltering>
<dynamicIpSecurity denyAction="Forbidden">
<denyByConcurrentRequests enabled="true" maxConcurrentRequests="10" />
<denyByRequestRate enabled="true" maxRequests="15" requestIntervalInMilliseconds="2000" />
</dynamicIpSecurity>
</security>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="31.00:00:00" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="font/woff" />
</staticContent>
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
<rewrite>
<rules>
<rule name="ProxyAdmin" stopProcessing="true">
<match url="developer-academy(.*)" />
<action type="Rewrite" url="https://ucappleacademy.azurewebsites.net/{R:1}" logRewrittenUrl="false" />
</rule>
<rule name="Redirect rquests to default azure websites domain" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^semeru.azurewebsites.net$" />
</conditions>
<action type="Redirect" url="https://www.uc.ac.id/{R:0}" />
</rule>
<rule name="WordPress: https://www.uc.ac.id" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


and this is my application.xdt



    <?xml version="1.0"?>  
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<proxy xdt:Transform="InsertIfMissing" enabled="true" preserveHostHeader="false" reverseRewriteHostInResponseHeaders="false" />
<httpCompression>
<dynamicTypes>
<add mimeType="application/json;charset=utf-8" enabled="true" xdt:Transform="InsertAfter(/configuration/system.webServer/httpCompression/dynamicTypes/add[(@mimeType='application/json')])" />
</dynamicTypes>
</httpCompression>
</system.webServer>
</configuration>









share|improve this question























  • should be enabled by default, try removing urlCompression element from your config.

    – Ken W MSFT
    Nov 26 '18 at 19:02











  • hellow @KenWMSFT i've already remove it and remove http compression on my application,xdt. But if you see on checkgzipcompression.com/?url=https%3A%2F%2Fwww.uc.ac.id it;s showing the gzip is not enabled, but the presentage is shown.

    – Nugroho Raharjo
    Nov 27 '18 at 8:08














1












1








1








I've a problem with gzip in my Azure Webapps. I'm using Wordpress (my domain is https://www.uc.ac.id) and using Windows OS base for my Webapps.



I can't enable gzip compression in my site. I was tried so many ways to enable it (with add compression on my web.config and application.xdt) but it's not working after i check in https://checkgzipcompression.com, the gzip is not enabled.



Please help me.



There is my web.config



 <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<pages enableSessionState="false" />
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<remove name="X-Powered-By" />
<add name="X-Frame-Options" value="SAMEORIGIN" />
<add name="X-Xss-Protection" value="1; mode=block" />
<add name="X-Content-Type-Options" value="nosniff" />
<add name="Referrer-Policy" value="no-referrer" />
</customHeaders>
<redirectHeaders>
<clear />
</redirectHeaders>
</httpProtocol>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="15000000" />
<denyUrlSequences>
<add sequence="xmlrpc.php" />
</denyUrlSequences>
</requestFiltering>
<dynamicIpSecurity denyAction="Forbidden">
<denyByConcurrentRequests enabled="true" maxConcurrentRequests="10" />
<denyByRequestRate enabled="true" maxRequests="15" requestIntervalInMilliseconds="2000" />
</dynamicIpSecurity>
</security>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="31.00:00:00" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="font/woff" />
</staticContent>
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
<rewrite>
<rules>
<rule name="ProxyAdmin" stopProcessing="true">
<match url="developer-academy(.*)" />
<action type="Rewrite" url="https://ucappleacademy.azurewebsites.net/{R:1}" logRewrittenUrl="false" />
</rule>
<rule name="Redirect rquests to default azure websites domain" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^semeru.azurewebsites.net$" />
</conditions>
<action type="Redirect" url="https://www.uc.ac.id/{R:0}" />
</rule>
<rule name="WordPress: https://www.uc.ac.id" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


and this is my application.xdt



    <?xml version="1.0"?>  
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<proxy xdt:Transform="InsertIfMissing" enabled="true" preserveHostHeader="false" reverseRewriteHostInResponseHeaders="false" />
<httpCompression>
<dynamicTypes>
<add mimeType="application/json;charset=utf-8" enabled="true" xdt:Transform="InsertAfter(/configuration/system.webServer/httpCompression/dynamicTypes/add[(@mimeType='application/json')])" />
</dynamicTypes>
</httpCompression>
</system.webServer>
</configuration>









share|improve this question














I've a problem with gzip in my Azure Webapps. I'm using Wordpress (my domain is https://www.uc.ac.id) and using Windows OS base for my Webapps.



I can't enable gzip compression in my site. I was tried so many ways to enable it (with add compression on my web.config and application.xdt) but it's not working after i check in https://checkgzipcompression.com, the gzip is not enabled.



Please help me.



There is my web.config



 <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<pages enableSessionState="false" />
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<remove name="X-Powered-By" />
<add name="X-Frame-Options" value="SAMEORIGIN" />
<add name="X-Xss-Protection" value="1; mode=block" />
<add name="X-Content-Type-Options" value="nosniff" />
<add name="Referrer-Policy" value="no-referrer" />
</customHeaders>
<redirectHeaders>
<clear />
</redirectHeaders>
</httpProtocol>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="15000000" />
<denyUrlSequences>
<add sequence="xmlrpc.php" />
</denyUrlSequences>
</requestFiltering>
<dynamicIpSecurity denyAction="Forbidden">
<denyByConcurrentRequests enabled="true" maxConcurrentRequests="10" />
<denyByRequestRate enabled="true" maxRequests="15" requestIntervalInMilliseconds="2000" />
</dynamicIpSecurity>
</security>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="31.00:00:00" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="font/woff" />
</staticContent>
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
<rewrite>
<rules>
<rule name="ProxyAdmin" stopProcessing="true">
<match url="developer-academy(.*)" />
<action type="Rewrite" url="https://ucappleacademy.azurewebsites.net/{R:1}" logRewrittenUrl="false" />
</rule>
<rule name="Redirect rquests to default azure websites domain" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^semeru.azurewebsites.net$" />
</conditions>
<action type="Redirect" url="https://www.uc.ac.id/{R:0}" />
</rule>
<rule name="WordPress: https://www.uc.ac.id" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


and this is my application.xdt



    <?xml version="1.0"?>  
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<proxy xdt:Transform="InsertIfMissing" enabled="true" preserveHostHeader="false" reverseRewriteHostInResponseHeaders="false" />
<httpCompression>
<dynamicTypes>
<add mimeType="application/json;charset=utf-8" enabled="true" xdt:Transform="InsertAfter(/configuration/system.webServer/httpCompression/dynamicTypes/add[(@mimeType='application/json')])" />
</dynamicTypes>
</httpCompression>
</system.webServer>
</configuration>






azure compression gzip azure-webapps






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 '18 at 9:19









Nugroho RaharjoNugroho Raharjo

63




63













  • should be enabled by default, try removing urlCompression element from your config.

    – Ken W MSFT
    Nov 26 '18 at 19:02











  • hellow @KenWMSFT i've already remove it and remove http compression on my application,xdt. But if you see on checkgzipcompression.com/?url=https%3A%2F%2Fwww.uc.ac.id it;s showing the gzip is not enabled, but the presentage is shown.

    – Nugroho Raharjo
    Nov 27 '18 at 8:08



















  • should be enabled by default, try removing urlCompression element from your config.

    – Ken W MSFT
    Nov 26 '18 at 19:02











  • hellow @KenWMSFT i've already remove it and remove http compression on my application,xdt. But if you see on checkgzipcompression.com/?url=https%3A%2F%2Fwww.uc.ac.id it;s showing the gzip is not enabled, but the presentage is shown.

    – Nugroho Raharjo
    Nov 27 '18 at 8:08

















should be enabled by default, try removing urlCompression element from your config.

– Ken W MSFT
Nov 26 '18 at 19:02





should be enabled by default, try removing urlCompression element from your config.

– Ken W MSFT
Nov 26 '18 at 19:02













hellow @KenWMSFT i've already remove it and remove http compression on my application,xdt. But if you see on checkgzipcompression.com/?url=https%3A%2F%2Fwww.uc.ac.id it;s showing the gzip is not enabled, but the presentage is shown.

– Nugroho Raharjo
Nov 27 '18 at 8:08





hellow @KenWMSFT i've already remove it and remove http compression on my application,xdt. But if you see on checkgzipcompression.com/?url=https%3A%2F%2Fwww.uc.ac.id it;s showing the gzip is not enabled, but the presentage is shown.

– Nugroho Raharjo
Nov 27 '18 at 8:08












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53477943%2fgzip-on-azure-webapps%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53477943%2fgzip-on-azure-webapps%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Create new schema in PostgreSQL using DBeaver

Deepest pit of an array with Javascript: test on Codility

Costa Masnaga