shadow_VRN36 Posted March 27, 2015 Report Share Posted March 27, 2015 Всем привет!!!!!! У меня назрела проблема...... Я решил в Apache 2.2.14 включить кеширования статики... у меня получилось... Но появились проблемы... Перестаёт нормально работать система афторизации... А именно когда нажимаешь войти, вводишь логин и пароль, то страница не обновляется и помогает только ручная перезагрузка страницы В конфиг вводил этот код... ifModule mod_deflate.c> # Включение GZIP-сжатия для различных типов файлов: TXT, SVG, RSS, javascript AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf x-font/eot x-font/ashx AddOutputFilterByType DEFLATE font/truetype font/opentype BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch bMSIE !no-gzip !gzip-only-text/html </ifModule> <ifModule mod_expires.c> #включение заголовка Expires, указывающего время устаревания файла ExpiresActive On ExpiresDefault "access plus 3600 seconds" # по умолчанию время устаревания составляет час, но для некоторых типов файлов мы его переопределим ExpiresByType image/x-icon "access plus 2592000 seconds" ExpiresByType image/jpeg "access plus 2592000 seconds" ExpiresByType image/png "access plus 2592000 seconds" ExpiresByType image/gif "access plus 2592000 seconds" ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" ExpiresByType text/css "access plus 604800 seconds" ExpiresByType text/javascript "access plus 604800 seconds" ExpiresByType application/javascript "access plus 604800 seconds" ExpiresByType application/x-javascript "access plus 604800 seconds" ExpiresByType text/html "access plus 600 seconds" ExpiresByType application/xhtml+xml "access plus 600 seconds" </ifModule> <ifModule mod_headers.c> # Самая главная часть: выдача заголовка, разрешающего кеш определенных типов файлов <filesMatch ".(ico|jpe?g|png|gif|swf)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> <filesMatch ".(css)$"> Header set Cache-Control "max-age=604800, public" </filesMatch> <filesMatch ".(js)$"> Header set Cache-Control "max-age=604800, public" </filesMatch> </ifModule> Quote Link to comment Share on other sites More sharing options...
shadow_VRN36 Posted March 27, 2015 Author Report Share Posted March 27, 2015 Как это исправить? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.