|
@ -1,27 +1,23 @@ |
|
|
server { |
|
|
server { |
|
|
set $projectLocation /var/www/localhost; |
|
|
|
|
|
server_name localhost; |
|
|
|
|
|
|
|
|
|
|
|
client_max_body_size 10M; |
|
|
|
|
|
client_body_buffer_size 1024k; |
|
|
|
|
|
|
|
|
root /var/www/localhost/public; |
|
|
|
|
|
error_log /var/log/nginx/localhost-error.log; |
|
|
|
|
|
access_log /var/log/nginx/localhost-access.log; |
|
|
|
|
|
|
|
|
location / { |
|
|
location / { |
|
|
root $projectLocation/public; |
|
|
|
|
|
error_log /var/log/nginx/localhost-error.log; |
|
|
|
|
|
access_log /var/log/nginx/localhost-access.log; |
|
|
|
|
|
|
|
|
|
|
|
location ~ ^/(.*)$ { |
|
|
|
|
|
try_files $uri /index.php =404; |
|
|
|
|
|
fastcgi_pass app:9000; |
|
|
|
|
|
include fastcgi_params; |
|
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.*)$; |
|
|
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info; |
|
|
|
|
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; |
|
|
|
|
|
fastcgi_param DOCUMENT_ROOT $realpath_root; |
|
|
|
|
|
|
|
|
try_files $uri /index.php$is_args$args; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
location ~* \.(jpg|gif|png|css|js|jpeg|pdf|doc|docx|map|ico|eof|woff|woff2|ttf|svg|xls|xlsx|pptx|odt|ods|odp|txt)$ { |
|
|
|
|
|
try_files $uri $uri/ /$1 =404; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
location ~ \.php { |
|
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$; |
|
|
|
|
|
fastcgi_pass notification-provider_app_1:9000; |
|
|
|
|
|
fastcgi_buffer_size 16k; |
|
|
|
|
|
fastcgi_buffers 4 16k; |
|
|
|
|
|
include fastcgi_params; |
|
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
|
|
|
|
|
fastcgi_param DOCUMENT_ROOT $document_root; |
|
|
|
|
|
internal; |
|
|
|
|
|
} |
|
|
|
|
|
location ~ \.php$ { |
|
|
|
|
|
return 404; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |