Welcome! Log In Create A New Profile

Advanced

Re: На псевдониме сайта не кешируются картинки и другие файлы - nginx

January 15, 2018 06:26AM
Я может что пропустил, а где у вас вообще кеширование? Ибо не вижу ни одной
из директив proxy_cache/proxy_cache_path/proxy_cache_key

On Mon, Jan 15, 2018 at 10:43 AM, ellaizzer <nginx-forum@forum.nginx.org>
wrote:

> Есть сайт (заменил на example.com)
>
> Вот его nginx конфиг:
>
>
> server {
> server_name example.com m.example.com www.example.com
> www.m.example.com;
> charset off;
> disable_symlinks if_not_owner from=$root_path;
> index index.html index.php;
> root $root_path/$subdomain;
> set $root_path /var/www/examplecom/data/www;
> set $subdomain example.com;
> ssi on;
> access_log /var/www/httpd-logs/example.com.access.log ;
> error_log /var/www/httpd-logs/example.com.error.log notice;
> include /etc/nginx/vhosts-includes/*.conf;
> include /etc/nginx/vhosts-resources/example.com/*.conf;
> location / {
> location ~*
> ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|
> bz2?|rar|swf|woff|ttf|otf||woff2|eot)$
> {
> try_files $uri $uri/ @fallback;
> expires 6M;
> }
> location / {
> try_files /does_not_exists @fallback;
> }
> location ~ [^/]\.ph(p\d*|tml)$ {
> try_files /does_not_exists @fallback;
> }
> }
> location @fallback {
> error_log /dev/null crit;
> proxy_pass http://127.0.0.1:8080;
> proxy_redirect http://127.0.0.1:8080 /;
> proxy_set_header Host $host;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Forwarded-Proto $scheme;
> proxy_set_header X-Forwarded-Port $server_port;
> access_log off ;
> }
> if ($host ~* ^((.*).example.com)$) {
> set $subdomain $1;
> }
> gzip on;
> gzip_comp_level 5;
> gzip_disable "msie6";
> gzip_types text/plain text/css image/jpeg image/png image/gif text/xml
> application/xml application/xhtml+xml text/javascript
> application/x-javascript application/javascript;
> listen 8.1.35.82:80;
> }
>
>
> Проблема в том что не кешуруются файлы на псевдонимах m.example.com и
> www.m.example.com, но кешируются на example.com и www.example.com
>
> Кто подскажет в чем может быть проблема некеширования на псевдонимах?
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?21,278140,278140#msg-278140
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

На псевдониме сайта не кешируются картинки и другие файлы - nginx

ellaizzer January 15, 2018 03:43AM

Re: На псевдониме сайта не кешируются картинки и другие файлы - nginx

ALex_hha January 15, 2018 06:26AM

Re: На псевдониме сайта не кешируются картинки и другие файлы - nginx

Aleksandr Sytar January 15, 2018 06:40AM

Re: На псевдониме сайта не кешируются картинки и другие файлы - nginx

ellaizzer February 14, 2018 07:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 253
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready