Created
May 3, 2018 22:12
-
-
Save jhonata-menezes/c9dca0a5d554fdb79735ee696b8f68bd to your computer and use it in GitHub Desktop.
virtual host para o nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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