-
Notifications
You must be signed in to change notification settings - Fork 153
/
virtualhost
40 lines (31 loc) · 1.06 KB
/
virtualhost
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 {
listen 80;
root /data/upload;
index index.html index.htm index.php;
server_name localhost;
access_log /var/log/nginx/osticket-access.log;
error_log /var/log/nginx/osticket-error.log error;
charset utf-8;
location / {
try_files $uri $uri/ /index.html /index.php?$query_string;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
# pass the PHP scripts to php5-fpm
# Note: \.php$ is susceptible to file upload attacks
# Consider using: "location ~ ^/(index|app|app_dev|config)\.php(/|$) {"
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param LARA_ENV local; # Environment variable for Laravel
fastcgi_param HTTPS off;
}
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
}