File docker/application/etc/nginx/sites-enabled/default changed (mode: 100644) (index 94aa242..4d4ebbf) |
1 |
1 |
server { |
server { |
2 |
|
listen 80 default_server; |
|
3 |
|
listen [::]:80 default_server; |
|
4 |
|
|
|
5 |
|
root /var/www/html; |
|
6 |
|
|
|
7 |
|
index index.php index.html index.htm; |
|
8 |
|
|
|
9 |
2 |
server_name _; |
server_name _; |
|
3 |
|
root /var/www/html/nasa/web; |
10 |
4 |
|
|
11 |
5 |
location / { |
location / { |
12 |
|
try_files $uri $uri/ =404; |
|
|
6 |
|
# try to serve file directly, fallback to app_dev.php |
|
7 |
|
try_files $uri /app_dev.php$is_args$args; |
13 |
8 |
} |
} |
|
9 |
|
# DEV |
|
10 |
|
# This rule should only be placed on your development environment |
|
11 |
|
# In production, don't include this and don't deploy app_dev.php or config.php |
|
12 |
|
location ~ ^/(app_dev|config)\.php(/|$) { |
|
13 |
|
fastcgi_pass unix:/run/php/php7.1-fpm.sock; |
|
14 |
|
fastcgi_split_path_info ^(.+\.php)(/.*)$; |
|
15 |
|
include fastcgi_params; |
|
16 |
|
# When you are using symlinks to link the document root to the |
|
17 |
|
# current version of your application, you should pass the real |
|
18 |
|
# application path instead of the path to the symlink to PHP |
|
19 |
|
# FPM. |
|
20 |
|
# Otherwise, PHP's OPcache may not properly detect changes to |
|
21 |
|
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 |
|
22 |
|
# for more information). |
|
23 |
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; |
|
24 |
|
fastcgi_param DOCUMENT_ROOT $realpath_root; |
|
25 |
|
} |
|
26 |
|
# PROD |
|
27 |
|
#location ~ ^/app\.php(/|$) { |
|
28 |
|
# fastcgi_pass unix:/run/php/php7.1-fpm.sock; |
|
29 |
|
# fastcgi_split_path_info ^(.+\.php)(/.*)$; |
|
30 |
|
# include fastcgi_params; |
|
31 |
|
# # When you are using symlinks to link the document root to the |
|
32 |
|
# # current version of your application, you should pass the real |
|
33 |
|
# # application path instead of the path to the symlink to PHP |
|
34 |
|
# # FPM. |
|
35 |
|
# # Otherwise, PHP's OPcache may not properly detect changes to |
|
36 |
|
# # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 |
|
37 |
|
# # for more information). |
|
38 |
|
# fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; |
|
39 |
|
# fastcgi_param DOCUMENT_ROOT $realpath_root; |
|
40 |
|
# # Prevents URIs that include the front controller. This will 404: |
|
41 |
|
# # http://domain.tld/app.php/some-path |
|
42 |
|
# # Remove the internal directive to allow URIs like this |
|
43 |
|
# internal; |
|
44 |
|
#} |
14 |
45 |
|
|
|
46 |
|
# return 404 for all other php files not matching the front controller |
|
47 |
|
# this prevents access to other php files you don't want to be accessible. |
15 |
48 |
location ~ \.php$ { |
location ~ \.php$ { |
16 |
|
include snippets/fastcgi-php.conf; |
|
17 |
|
fastcgi_pass unix:/run/php/php7.1-fpm.sock; |
|
|
49 |
|
return 404; |
18 |
50 |
} |
} |
|
51 |
|
|
|
52 |
|
error_log /var/log/nginx/project_error.log; |
|
53 |
|
access_log /var/log/nginx/project_access.log; |
19 |
54 |
} |
} |