Created
September 13, 2018 13:35
-
-
Save samhk222/432012b83d4fa58df5b216e03055cb5e to your computer and use it in GitHub Desktop.
This file contains 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 { | |
listen 80 default; | |
client_max_body_size 108M; | |
#server_name apps.4yousee.com.br; | |
root /application/public; | |
#index index.php; | |
location / { | |
# try to serve file directly, fallback to index.php | |
try_files $uri /index.php$is_args$args; | |
} | |
location ~ ^/index\.php(/|$) { | |
fastcgi_pass php-fpm:9000; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param DOCUMENT_ROOT $document_root; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
#fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; | |
#fastcgi_buffers 16 16k; | |
#fastcgi_buffer_size 32k; | |
#fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
internal; | |
} | |
# return 404 for all other php files not matching the front controller | |
# this prevents access to other php files you don't want to be accessible. | |
location ~ \.php$ { | |
return 404; | |
} | |
access_log /var/log/nginx/application.access.log; | |
error_log /var/log/nginx/project_error.log; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment