-
Notifications
You must be signed in to change notification settings - Fork 0
/
default
40 lines (33 loc) · 786 Bytes
/
default
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
server {
# Port to listten
listen 80;
# Root directory
# We're assuming laravel here, if not just /vagrant
root /vagrant/public;
# Set index to php file
index index.php;
# Make site accessible from http://localhost/
server_name localhost;
# Location
location / {
try_files $uri/ /index.php?$query_string;
}
# Remove trailing slash
if (!-d $request_filename){
rewrite ^/(.+)/$ /$1 permanent;
}
# Configure PHP FPM
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Remove htaccess
location ~ /\.ht {
deny all;
}
}