Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. DAEMON_OPTS="-a :80
  2. -T localhost:6082
  3. -f /etc/varnish/default.vcl
  4. -S /etc/varnish/secret
  5. -s malloc,256m"
  6.  
  7. backend default {
  8. .host = "127.0.0.1";
  9. .port = "8080";
  10. .connect_timeout = 16s;
  11. .first_byte_timeout = 96s;
  12. .between_bytes_timeout = 8s;
  13.  
  14. upstream backend {
  15. ip_hash;
  16. server 127.0.0.1:80; # IP goes here.
  17. }
  18.  
  19. server {
  20. listen 443 ssl;
  21. server_name example.com;
  22.  
  23.  
  24. ssl_certificate /var/www/ascacacaa1341.crt;
  25. ssl_certificate_key /var/www/www.example.com.key;
  26.  
  27. ssl_session_cache shared:SSL:10m;
  28. ssl_session_timeout 10m;
  29.  
  30. ssl_ciphers HIGH:!aNULL:!MD5;
  31. ssl_prefer_server_ciphers on;
  32.  
  33. location / {
  34. #try_files $uri $uri/ /index.php?$query_string;
  35. proxy_pass http://backend;
  36. proxy_set_header X-Real-IP $remote_addr;
  37. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  38. proxy_set_header X-Forwarded-Port 443;
  39. proxy_set_header X-Forwarded-Proto $scheme;
  40. proxy_set_header Host $host;
  41. proxy_set_header X-Secure on;
  42. }
  43.  
  44. server {
  45.  
  46. listen 8080;
  47.  
  48. server_name www.example.com example.com;
  49.  
  50. root /var/www/test/public;
  51. index index.php;
  52. #charset koi8-r;
  53. location / {
  54. try_files $uri $uri/ /index.php?$query_string;
  55. # rewrite ^ https://$server_name$request_uri permanent;
  56. }
  57.  
  58.  
  59. location ~ .php$ {
  60. try_files $uri =404;
  61. fastcgi_split_path_info ^(.+.php)(/.+)$;
  62. include fastcgi_params;
  63. fastcgi_pass 127.0.0.1:9000;
  64. fastcgi_index index.php;
  65. fastcgi_param SCRIPT_FILENAME /var/www/test/public$fastcgi_script_name;
  66. }
  67. location /var/www/test/public {
  68. autoindex on;
  69. autoindex_exact_size off;
  70. }
  71. # We don't need .ht files with nginx.
  72. location ~ /.ht {
  73. deny all;
  74. }
  75.  
  76. # Set header expirations on per-project basis
  77. location ~* .(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
  78. expires 365d;
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement