Skip to content

Instantly share code, notes, and snippets.

@jhonata-menezes
Created May 3, 2018 22:12
Show Gist options
  • Save jhonata-menezes/c9dca0a5d554fdb79735ee696b8f68bd to your computer and use it in GitHub Desktop.
Save jhonata-menezes/c9dca0a5d554fdb79735ee696b8f68bd to your computer and use it in GitHub Desktop.
virtual host para o nginx
server {
server_name localhost;
root /var/www/html;
location = / {
try_files @site @site;
}
location / {
try_files $uri $uri/ @site;
}
location ~ \.php$ {
return 404;
}
location @site {
fastcgi_pass fpm:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
#uncomment when running via https
#fastcgi_param HTTPS on;
}
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment