-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.conf
More file actions
53 lines (41 loc) · 1.36 KB
/
default.conf
File metadata and controls
53 lines (41 loc) · 1.36 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
server {
# Set the port to listen on and the server name
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/html/public;
# Set the directory index files
index index.html index.php;
# Specify the default character set
charset utf-8;
rewrite ^/index\.php/?(.*)$ /$1 permanent;
# Setup the default location configuration
location / {
if (-f $request_filename) {
break;
}
rewrite ^(.*)$ /index.php$1 last;
}
location ~ ^/index\.php(?:/|$) {
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param HTTP_PROXY "";
fastcgi_param APP_ENV dev;
}
# Specify the details of favicon.ico
location = /favicon.ico { access_log off; log_not_found off; }
# Specify the details of robots.txt
location = /robots.txt { access_log off; log_not_found off; }
# Specify the logging configuration
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug;
sendfile off;
client_max_body_size 20m;
# Specify what happens what .ht files are requested
location ~ /\.ht {
deny all;
}
}