Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DAEMON_OPTS="-a :80
- -T localhost:6082
- -f /etc/varnish/default.vcl
- -S /etc/varnish/secret
- -s malloc,256m"
- backend default {
- .host = "127.0.0.1";
- .port = "8080";
- .connect_timeout = 16s;
- .first_byte_timeout = 96s;
- .between_bytes_timeout = 8s;
- upstream backend {
- ip_hash;
- server 127.0.0.1:80; # IP goes here.
- }
- server {
- listen 443 ssl;
- server_name example.com;
- ssl_certificate /var/www/ascacacaa1341.crt;
- ssl_certificate_key /var/www/www.example.com.key;
- ssl_session_cache shared:SSL:10m;
- ssl_session_timeout 10m;
- ssl_ciphers HIGH:!aNULL:!MD5;
- ssl_prefer_server_ciphers on;
- location / {
- #try_files $uri $uri/ /index.php?$query_string;
- proxy_pass http://backend;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Port 443;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header Host $host;
- proxy_set_header X-Secure on;
- }
- server {
- listen 8080;
- server_name www.example.com example.com;
- root /var/www/test/public;
- index index.php;
- #charset koi8-r;
- location / {
- try_files $uri $uri/ /index.php?$query_string;
- # rewrite ^ https://$server_name$request_uri permanent;
- }
- location ~ .php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+.php)(/.+)$;
- include fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /var/www/test/public$fastcgi_script_name;
- }
- location /var/www/test/public {
- autoindex on;
- autoindex_exact_size off;
- }
- # We don't need .ht files with nginx.
- location ~ /.ht {
- deny all;
- }
- # Set header expirations on per-project basis
- location ~* .(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
- expires 365d;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement