Rezultate 1 la 4 din 4

Subiect: Nginx vs Varnish: ce alegem?

Vizualizare arbore

  1. #4
    Avatarul lui Dan
    Dan
    Dan este deconectat Membru SeoPedia
    Reputatie:
    111
    Data înscrierii
    17th November 2004
    Locaţie
    Cluj
    Posturi
    3.358
    Putere Rep
    111


    2 out of 2 members found this post helpful.

    Implicit

    wordpress merge excelent cu nginx si php7.
    Ca mecanism de cache, personal folosesc w3 total cache (cu memcached, redis, opcode, care imi e la indemana cand instalez)

    Ai destule instructiuni aici: https://codex.wordpress.org/Nginx

    Ca bonus, daca te pasioneaza, poti citi si aici: https://www.nginx.com/blog/benefits-...caching-nginx/

    Eu folosesc urmatorul config (pe langa instructiunile legate de domeniu, calea fisierelor si php):
    (si rog sa fiu si eu corectat daca nu e bine)
    Cod:
    # This order might seem weird - this is attempted to match last if rules below fail.
    location / {
    	try_files $uri $uri/ /index.php?$args;
    }
    
    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    
    # Directives to send expires headers and turn off 404 error logging.
    location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
           access_log off; log_not_found off; expires max;
    }
    
    location = /favicon.ico {
    	log_not_found off;
    	access_log off;
    }
    location = /robots.txt {
    	allow all;
    	log_not_found off;
    	access_log off;
    }
    
    # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
    # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
    location ~ /\. {
    	deny all;
    }
    # Deny access to any files with a .php extension in the uploads directory
    # Works in sub-directory installs and also in multisite network
    # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
    location ~* /(?:uploads|files)/.*\.php$ {
    	deny all;
    }
    
    # Zero-day exploit defense.
    # http://forum.nginx.org/read.php?2,88845,page=3
    # Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.
    # Comment the 'try_files' line out if you set up php-fpm/php-fcgi on another machine.  And then cross your fingers that you won't get hacked.
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    
        
        client_max_body_size 100m;
    PS: din cunostintele mele, NGINX nu exclude Varnish, sunt lucruri diferite.
    Ultima modificare făcută de Dan; 8th May 2017 la 17:22.
    Trust, but verify.

Informații subiect

Utilizatori care navighează în acest subiect

Momentan este/sunt 1 utilizator(i) care navighează în acest subiect. (0 membrii și 1 vizitatori)

Thread-uri Similare

  1. Comparator de preturi? Ce alegem?
    De ZimZum în forumul Motoare de cautare romanesti
    Răspunsuri: 28
    Ultimul Post: 13th January 2015, 15:30
  2. Magazin on-line, ce platforma alegem?
    De ZimZum în forumul Subiecte pentru incepatori
    Răspunsuri: 27
    Ultimul Post: 15th April 2013, 12:04
  3. Conversie apache .htaccess - nginx
    De Gabriel Puscuta în forumul Server side
    Răspunsuri: 3
    Ultimul Post: 26th January 2011, 16:18
  4. Cum alegem directoare platite?
    De andrei în forumul Directoare web straine
    Răspunsuri: 12
    Ultimul Post: 1st February 2007, 16:03
  5. Cum alegem cel mai bun shopping chart ?
    De evolution în forumul Comert electronic, e-Commerce
    Răspunsuri: 2
    Ultimul Post: 15th November 2006, 16:44

Permisiuni postare

  • Nu puteţi posta subiecte noi.
  • Nu puteţi răspunde la subiecte
  • Nu puteţi adăuga ataşamente
  • Nu puteţi modifica posturile proprii
  •