Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 127.0.0.1:8080;
- server_name localhost;
- root /var/aegir;
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- }
- server {
- listen 80;
- root /var/aegir;
- index index.php index.html index.htm;
- server_name aegir3-dev.aegir.local;
- location / {
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://localhost:8080;
- proxy_cache my-cache;
- # Define which responses to cache and for how long
- proxy_cache_valid 200 302 60m;
- proxy_cache_valid 404 5m;
- proxy_cache_key $host$uri$is_args$args;
- add_header X-Cache $upstream_cache_status;
- }
- location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ {
- expires 30d;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement