Skip to content

Instantly share code, notes, and snippets.

@juanpablocs
Last active December 17, 2015 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanpablocs/03a4c8708b26ba0d73c6 to your computer and use it in GitHub Desktop.
Save juanpablocs/03a4c8708b26ba0d73c6 to your computer and use it in GitHub Desktop.
mi configuración para trackear urls distintas a /... si no se coloca $query_string nginx da error cuando colocas por ejemplo /?hola=1
```
server {
server_name www.mysite.com;
return 301 $scheme://mysite.com$request_uri;
}
server {
server_name mysite.com;
root /home/nginx/domains/mysite.com;
try_files $uri /index.php?$query_string;
location ~ ^/(artista|descarga).+\.html$ {
try_files $uri /index.php?$query_string;
}
location ~ ^/stream/.+\.mp3$ {
try_files $uri /index.php?$query_string;
}
# ngx_pagespeed & ngx_pagespeed handler
#include /usr/local/nginx/conf/pagespeed.conf;
#include /usr/local/nginx/conf/pagespeedhandler.conf;
#include /usr/local/nginx/conf/pagespeedstatslog.conf;
#logs
access_log /home/nginx/domains/mysite.com/log/access.log;
error_log /home/nginx/domains/mysite.com/log/error.log;
include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/drop.conf;
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment