forked from FreshPorts/freshports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirtualhost-common.conf.sample
42 lines (32 loc) · 1.16 KB
/
virtualhost-common.conf.sample
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
root /usr/local/www/freshports/www/;
index index.php index.html index.htm;
gzip on;
gzip_vary on;
gzip_http_version 1.1;
gzip_comp_level 6;
gzip_types text/plain text/css text/javascript text/xml application/javascript application/json application/xml application/xml+rss;
error_log /var/log/nginx/freshports.org-error.log;
access_log /var/log/nginx/freshports.org-access.log combined;
location ~ /(login|forgotten-password|password-reset-via-token.php).php {
limit_req zone=auth_limit burst=5;
include /usr/local/www/freshports/configuration/php-processing.conf;
}
location ~ ^/phorum/(.*)$ {
try_files $uri /--/forums-gone.php;
}
location ~ \.php$ {
include /usr/local/www/freshports/configuration/php-processing.conf;
}
# css files are appended with a content hash so have long expiry
location /css/ {
expires 2y;
try_files $uri $uri/ /--/index.php;
}
# jquery libs and most images are relatively static
location ~ /(javascript/jquery.+\.js|images/[^/]+\.(png|gif|jpg))$ {
expires 6M;
try_files $uri $uri/ /--/index.php;
}
location / {
try_files $uri $uri/ /--/index.php;
}