Komprimierung über httpd funktioniert ncht

vor 5 Jahren

Hallo,

 

ich habe eine Website über Wordpress erstellt.

Wie im Hilfecenter beschrieben habe ich die Datei httpd.conf im entsprechenden Ordner erstellt und den Text eingefügt um die Homepage komprimiert auszugeben.

Leider funktioniert das nicht.

 

So sieht die Datei aus:


<Directory /home/www/public_html>
AllowOverride All
</Directory>

LoadModule deflate_module modules/mod_deflate.so
LoadModule filter_module modules/mod_filter.so

<Directory /home/www/public_html>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/shtml
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</Directory>

<Directory /home/www/public_html>
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/ico "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/jpg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType text/css "access plus 1 months"
ExpiresByType text/javascript "access plus 1 months"
ExpiresByType application/x-javascript "access plus 1 months"
ExpiresByType application/javascript "access plus 1 months"
</ifmodule>
</Directory>

 

Muss man Leerzeichen beachten?

 

Bitte um Hilfe

 

Viele Grüße

 

Steve

210

8

    • vor 5 Jahren

      Hallo @StDre ,

      normaler Weise muss der Pfad zu Wordpress angegeben werden.

      Also so:

      LoadModule deflate_module modules/mod_deflate.so
      LoadModule filter_module modules/mod_filter.so
      <Directory /home/www/public_html/wordpress>
      AddOutputFilterByType DEFLATE text/plain
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE text/xml
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE text/javscript
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE application/rss+xml
      AddOutputFilterByType DEFLATE application/javascript
      AddOutputFilterByType DEFLATE application/x-javascript
      </Directory>

      Ich kann ja mal versuchen @Ingo F. oder @Nadine H. zu rufen, die können sich das mal ansehen.

      Dazu musst du aber deine URL angeben oder die Kundeninfo ausfüllen.

      MfG. Bernd

       

      4

      Antwort

      von

      vor 5 Jahren

      Oder man passt die entsprechende PHP-Datei an, wenn man sich auskennt (In der Regel die index.php. Wie das bei Wordpress ist weiss ich nicht). Dafür folgenden Code in die PHP-Datei, idealer Weise nach den header-Anweisungen.

       

       

      if(extension_loaded("zlib") AND strstr($_SERVER["HTTP_ACCEPT_ENCODING"],"gzip")) _start("ob_gzhandler");

       

       

       

      Antwort

      von

      vor 5 Jahren

      an welcher Stelle müsste ich das dann einfügen?

       

      <?php
      /**
      * Front to the WordPress application. This file doesn't do anything, but loads
      * wp-blog-header.php which does and tells WordPress to load the theme.
      *
      * @package WordPress
      */

      /**
      * Tells WordPress to load the WordPress theme and output it.
      *
      * @VAR bool
      */
      define( 'WP_USE_THEMES', true );

      /** Loads the WordPress Environment and Template */
      require __DIR__ . '/wp-blog-header.php';

       

      ??

      Antwort

      von

      vor 5 Jahren

      StDre

      an welcher Stelle müsste ich das dann einfügen?

      an welcher Stelle müsste ich das dann einfügen?

      StDre

      an welcher Stelle müsste ich das dann einfügen?


      https://matthias.goebel.biz/2011/07/28/wordpress-schneller-machen-mit-gzip/

      Uneingeloggter Nutzer

      Antwort

      von

    • vor 5 Jahren

      Hallo @StDre ,

       

      wie prüfst Du, ob das funktioniert? Gzip ist bei Dir jedenfalls "enabled". Die Pagespeedwerte sind eigentlich auch ok. Das subjektive Ladeverhalten auch.

       

      Grüße, Dietmar

       

      2

      Antwort

      von

      vor 5 Jahren

      Hallo Dietmar,

       

      Ich prüfe das mit https://developers.google.com/speed/pagespeed/insights/?hl=de&url=www.lsp-3d.de

      und https://www.seobility.net/de/

      Den Tip von Bernd habe ich schon probiert, das hat bei der Desktopversion auch gleich was gebracht, bei der mobilen Version nicht.

      Allerdings hat sich das Ergebnis auch nach kurzer Zeit verschlechtert, ohne das ich was geändert habe.

      Warum das so ist, ist mir unklar.

       

      Grüße

       

      Steve

      Antwort

      von

      vor 5 Jahren

      StDre

      Hallo Dietmar, Ich prüfe das mit https://developers.google.com/speed/pagespeed/insights/?hl=de&url=www.lsp-3d.de und https://www.seobility.net/de/ Den Tip von Bernd habe ich schon probiert, das hat bei der Desktopversion auch gleich was gebracht, bei der mobilen Version nicht. Allerdings hat sich das Ergebnis auch nach kurzer Zeit verschlechtert, ohne das ich was geändert habe. Warum das so ist, ist mir unklar. Grüße Steve

      Hallo Dietmar,

       

      Ich prüfe das mit https://developers.google.com/speed/pagespeed/insights/?hl=de&url=www.lsp-3d.de

      und https://www.seobility.net/de/

      Den Tip von Bernd habe ich schon probiert, das hat bei der Desktopversion auch gleich was gebracht, bei der mobilen Version nicht.

      Allerdings hat sich das Ergebnis auch nach kurzer Zeit verschlechtert, ohne das ich was geändert habe.

      Warum das so ist, ist mir unklar.

       

      Grüße

       

      Steve

      StDre

      Hallo Dietmar,

       

      Ich prüfe das mit https://developers.google.com/speed/pagespeed/insights/?hl=de&url=www.lsp-3d.de

      und https://www.seobility.net/de/

      Den Tip von Bernd habe ich schon probiert, das hat bei der Desktopversion auch gleich was gebracht, bei der mobilen Version nicht.

      Allerdings hat sich das Ergebnis auch nach kurzer Zeit verschlechtert, ohne das ich was geändert habe.

      Warum das so ist, ist mir unklar.

       

      Grüße

       

      Steve


      Hallo Steve,

      ich kann Dietmar nur Recht geben, die Komprimierung ist eingeschaltet. Leider zeigt der Test bei jedem Aufruf andere Werte, ist also nicht sehr aussagekräftig. Ich finde aber nicht, dass die Ladezeit zu hoch ist, bei mir geht es eigentlich recht flott auch mit dem Huawei.

      MfG. Bernd

      Uneingeloggter Nutzer

      Antwort

      von

    Uneingeloggter Nutzer

    Frage

    von