blob: e609c9e463e2503c255ea8e2521ff0e757706500 (
plain)
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
|
# redirect http to https.
server {
listen 80;
server_name pluxml.example.org;
root /usr/share/webapps/pluxml;
index index.php index.html index.htm;
# deny direct access
location ~ ^/(config|\.ht) {
deny all;
}
location ^~ /data/configuration/ {
deny all;
}
# Optional: set long EXPIRES header on static assets
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
# Optional: Don't log access to assets
access_log off;
}
access_log /var/log/nginx/pluxml.access.log;
error_log /var/log/nginx/pluxml.error.log;
if (-f $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^/([^feed\/].*)$ /index.php?$1 last;
rewrite /feed\/(.*)$ /feed.php?$1 last;
break;
}
# enable php
location ~ \.php$ {
# fastcgi_pass 127.0.0.1:9000;
# use php-fpm
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
|