-
Notifications
You must be signed in to change notification settings - Fork 1
/
dev_site.conf
43 lines (29 loc) · 1007 Bytes
/
dev_site.conf
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
# A default site for NGINX
# Change this for secure redirect if you are testing security based applications
# redirect all http traffic to https
#server {
# listen 80;
# server_name __SERVERNAME__;
# return 301 https://$host$request_uri;
#}
# Don't forget to do the configure default if you really want security.
server {
listen 80;
root /data/html;
# Add index.php to the list if you are using PHP
index index.html index.php main.html;
server_name __SERVERNAME__;
include /data/conf/nginx/conf.d/error_dev.conf;
access_log /data/logs/nginx/dev_site.access.log;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location ~* \.php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}