-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
25 lines (21 loc) · 701 Bytes
/
nginx.conf
File metadata and controls
25 lines (21 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
events {
}
http {
include /etc/nginx/mime.types;
server {
listen 80 default_server;
root /var/www/public;
index index.php index.html;
# Try serving public static files; if none found, internally rewrite URI to 'index.php + URL args'
location / {
try_files $uri $uri/ /index.php?$args;
}
# Handle internally rewritten URI request (index.php + URL args) with PHP-FPM
# Which executes php-code outside of public, in /app
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}