server { # listen 0.0.0.0:443 ssl; set $app_env "pro"; listen 0.0.0.0:80; server_name localhost; ssl_certificate bitnami/certs/server.crt; ssl_certificate_key bitnami/certs/server.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; root /app/; index index.php; sendfile off; rewrite ^([^.]*[^/])$ $1/ permanent; # REDIRECTS 301 location /series { rewrite ^/series(.*) http://losdelvolcan.com/clientes/2015/series$1 permanent; } location /bigdatasalud { rewrite ^/bigdatasalud(.*) http://losdelvolcan.com/clientes/2015/planner-media/bigdatasalud$1 permanent; } location /proyectos/graficos/volcan-calbuco { rewrite ^/proyectos/graficos/volcan-calbuco(.*) http://losdelvolcan.com/clientes/2016/prodigiosovolcan/volcan-calbuco$1 permanent; } location /proyectos/noeslomismo { rewrite ^/proyectos/noeslomismo(.*) http://losdelvolcan.com/clientes/2015/prodigiosovolcan/noeslomismo$1 permanent; } location /clientes/auditorias_creativas/adria { rewrite ^/clientes/auditorias_creativas/adria(.*) /auditoria-creativa/adria$1 permanent; } location /firma { rewrite ^/firma(.*) http://losdelvolcan.com/utils/firma/firma.html permanent; } location /share { rewrite ^/share(.*) http://losdelvolcan.com/utils/share/share.html permanent; } location /clientes { rewrite ^/clientes(.*) http://losdelvolcan.com/clientes$1 permanent; } location /clients { rewrite ^/clients(.*) http://losdelvolcan.com/clients$1 permanent; } # Locations location ~ (/aviario/|/stromboli|/auditoria-creativa|/aperturasweb|/sismogramas)(.*) { location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|map)$ { expires 604800; log_not_found off; } root /app/pv/; expires 1s; index index.html; } location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|map)$ { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; expires 604800; log_not_found off; } location / { try_files $uri $uri/ /index.php?$args; proxy_set_header X-Real-IP $remote_addr; proxy_set_header HOST $http_host; proxy_set_header X-NginX-Proxy true; add_header Pragma public; add_header Cache-Control "public"; expires 8M; } location ~ "^/modules/(.+)$" { # This is cool because no php is touched for static content. # include the "?$args" part so non-default permalinks doesn't break when using query string try_files $uri $uri/index.html /index.php?$args; } location = /xmlrpc.php { allow 192.0.64.0/18; allow 64.34.206.0/24; allow 198.181.116.0/22; allow 66.155.105.128/26; allow 69.90.253.0/24; allow 76.74.248.128/25; allow 76.74.255.0/25; allow 2001:1978:1e00:3::/64; allow 2620:115:c000::/40; deny all; } location ~* .(?:ico|jpg|webp|jpeg|gif|css|png|js|ico|bmp|zip|woff|woff2)$ { access_log off; log_not_found off; add_header Pragma public; add_header Cache-Control "public"; expires 8M; } location ~ \.php$ { fastcgi_pass phpfpm:9000; fastcgi_index index.php; add_header X-FastCGI-Cache $upstream_cache_status; include fastcgi.conf; add_header Pragma public; add_header Cache-Control "public"; expires 1s; } }