-
Notifications
You must be signed in to change notification settings - Fork 3
/
php.api.example
38 lines (29 loc) · 1.05 KB
/
php.api.example
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
################################
# RLAPI-v3 Configuration #
################################
server {
listen 443 ssl;
server_name *your_server_name_here*;
root /var/www/rlapi-v3/public;
ssl_certificate *ssl_cert*;
ssl_certificate_key *ssl_key*;
add_header "Access-Control-Allow-Origin" "*";
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass php; # Nginx has it set to php by default.
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
internal;
}
location ~ \.php$ {
return 404;
}
error_log /var/log/nginx/api_error.log;
access_log /var/log/nginx/api_access.log;
}