-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.sample.skeleton.conf
64 lines (53 loc) · 1.64 KB
/
nginx.sample.skeleton.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/local/webide/web;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location ~ ^/panel {
root /usr/local/webide/adminpanel/dist;
location ~ ^/panel/assets/autotestGenerator/(.+) {
root /usr/local/webide/autotestGenerator;
try_files /$1 =404;
}
location ~ ^/panel/assets/(.+) {
root /usr/local/webide/adminpanel/dist/assets;
try_files /$1 =404;
}
location ~ ^/panel/((?!assets).) {
root /usr/local/webide/adminpanel/dist;
try_files /index.html =404;
}
try_files /index.html =404;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
error_page 500 503 504 /50x.html;
location = /50x.html {
root /usr/local/webide/web;
internal;
}
error_page 502 /502.php;
location = /static {
expires 1d;
add_header Vary Accept-Encoding;
access_log off;
add_header Cache-Control "public";
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /usr/local/webide/web;
fastcgi_pass unix:SOCKET_FILENAME;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# --- HERE ---
}