Skip to content

Instantly share code, notes, and snippets.

@lnoering
Last active August 29, 2015 14:26
Show Gist options
  • Save lnoering/ce8fa9548dc05eb6efd7 to your computer and use it in GitHub Desktop.
Save lnoering/ce8fa9548dc05eb6efd7 to your computer and use it in GitHub Desktop.
Vhost para projetos locais com Nginx.
# versao do nginx 1.8.0
server {
listen 80;
server_name ~^(www\.)?(?<sname>.+).local.com.br$;
root /home/projetos/$sname;
error_log /var/logs/$sname.error.log;
access_log /var/logs/$sname.access.log;
# rewrite ^/media/(.*)$ http://$sname.media.com.br/$1 permanent;
location / {
index index.php index.html index.htm;
}
# include /etc/nginx/magento.conf;
# include /etc/nginx/gzip.conf;
# include /etc/nginx/php.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment