51 lines
1.5 KiB
Plaintext
51 lines
1.5 KiB
Plaintext
daemon off;
|
|
worker_processes 1;
|
|
pid nginx.pid;
|
|
error_log stderr warn;
|
|
|
|
events {
|
|
worker_connections 128;
|
|
}
|
|
|
|
http {
|
|
access_log off;
|
|
server_tokens off;
|
|
server {
|
|
listen 127.0.0.1:@PORT@;
|
|
if ($http_host !~* "^(127\.0\.0\.1|localhost)(:[0-9]{1,5})?$") {
|
|
return 400;
|
|
}
|
|
location = /webconsole {
|
|
return 302 /webconsole/;
|
|
}
|
|
location ^~ /webconsole/ {
|
|
root @STAGE@;
|
|
index index.html;
|
|
types {
|
|
text/html html;
|
|
text/css css;
|
|
application/javascript js;
|
|
application/json json;
|
|
image/x-icon ico;
|
|
image/png png;
|
|
text/plain txt;
|
|
}
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
location / {
|
|
fastcgi_param SCRIPT_FILENAME @STAGE@/router.php;
|
|
fastcgi_param SCRIPT_NAME /router.php;
|
|
fastcgi_param REQUEST_URI $request_uri;
|
|
fastcgi_param QUERY_STRING $query_string;
|
|
fastcgi_param REQUEST_METHOD $request_method;
|
|
fastcgi_param CONTENT_TYPE $content_type;
|
|
fastcgi_param CONTENT_LENGTH $content_length;
|
|
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
|
fastcgi_param SERVER_NAME $server_name;
|
|
fastcgi_param SERVER_PORT $server_port;
|
|
fastcgi_param REMOTE_ADDR $remote_addr;
|
|
fastcgi_pass unix:@STAGE@/php.sock;
|
|
}
|
|
}
|
|
}
|