| 1 |
server { |
| 2 |
listen 80; |
| 3 |
server_name localhost; |
| 4 |
root /var/www/html; |
| 5 |
|
| 6 |
index index.php; |
| 7 |
|
| 8 |
location / { |
| 9 |
try_files $uri $uri/ /index.php?$args; |
| 10 |
} |
| 11 |
|
| 12 |
location ~ [^/]\.php(/|$) { |
| 13 |
fastcgi_split_path_info ^(.+?\.php)(/.*)$; |
| 14 |
|
| 15 |
include fastcgi_params; |
| 16 |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| 17 |
fastcgi_param PATH_INFO $fastcgi_path_info; |
| 18 |
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; |
| 19 |
|
| 20 |
fastcgi_pass fpm:9000; |
| 21 |
fastcgi_index index.php; |
| 22 |
} |
| 23 |
} |