Browsing: nginx

add in http  {} proxy_cache_path D:/nginx-1.18.0/cache levels=1:2 keys_zone=cache_one:500m inactive=1d max_size=30g; proxy_cache_key “$host$request_uri$cookie_user”; server {} config server { listen 80; server_name…

nginx rewrite rule on nginx #disallow path or file location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) { return 404; } #一键申请SSL证书验证目录相关设置 location ~ \.well-known{…

# Enable pagespeed module by putting the following in http context pagespeed on; pagespeed Domain example.com; pagespeed DownstreamCachePurgeLocationPrefix http://lb1.i; pagespeed…

server { listen 80; server_name ssx8.com; gzip off; location / { # proxy_pass https://www.ssx8.com; rewrite ^/(.*)$ https://www.ssx8.com/$1 permanent; } }…

#https://www.vpseo.com/2019/10/16/wp-super-cache-and-nginx-config/ #https://www.vpseo.com/2019/09/06/wp-rocket%E9%85%8D%E5%90%88nginx%E5%AE%9E%E7%8E%B0%E7%BA%AF%E9%9D%99%E6%80%81%E5%8C%96%E5%8A%A0%E9%80%9Fwordpress%EF%BC%8Crocket-nginx/ now you can use the simply static and wp-rocket plugin together.   below code is edit base on…

location / { proxy_pass http://ghs.google.com; proxy_set_header Host w.mai1.me; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Cookie “”; proxy_hide_header…

nginx 301 redirect to www and https website: http://www.cl-light.com -> https://www.cl-light.com {http://cl-light.com + https://cl-light.com} -> https://www.cl-light.com server { listen 80;…

server { listen *:80; server_name www.shopym.com *.shopym.com shopym.com; root /var/www/html; if ($http_host != “www.shopym.com”) { rewrite ^ http://www.shopym.com$request_uri permanent; }…

vi /etc/nginx/conf.d/gzipfcgi.conf gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 9; gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php;…