rc: nginx.c: add h5ai support (https://larsjung.de/h5ai/)

arm-sdk7
pedro 4 years ago
parent 425e8636fa
commit 9b3a84d7f4

@ -60,7 +60,6 @@ static void build_fastcgi_conf(void)
/* Starting a fastcgi configuration file */
mkdir_if_none(nginxdir);
if ((fastcgi_conf_file = fopen(fastcgiconf, "w")) == NULL) {
simple_unlock(fastcgiconf);
return;
}
@ -92,7 +91,6 @@ static void build_mime_types(void)
/* Starting the mime.types configuration file */
mkdir_if_none(nginxdir);
if ((mimetypes_file = fopen(mimetypes, "w")) == NULL) {
simple_unlock(mimetypes);
return;
}
@ -157,7 +155,6 @@ static void build_nginx_conf(void)
/* Starting the nginx configuration file */
mkdir_if_none(nginxdir);
if ((nginx_conf_file = fopen(nginxconf, "w")) == NULL) {
simple_unlock(nginxconf);
perror(nginxconf);
return;
}
@ -188,7 +185,7 @@ static void build_nginx_conf(void)
"include %s;\n"
"include %s;\n"
"default_type application/octet-stream;\n"
"log_format main '$remote_addr - $remote_user [$time_local] $status '\n"
"log_format main '$remote_addr - $remote_user [$time_local] $status'\n"
"'\"$request\" $body_bytes_sent \"$http_referer\" '\n"
"'\"$http_user_agent\" \"$http_x_forwarded_for\"';\n"
"sendfile %s;\n"
@ -241,7 +238,7 @@ static void build_nginx_conf(void)
buf = nginxdocrootdir;
fprintf(nginx_conf_file, "root %s;\n"
"index index.html index.htm index.php;\n"
"index index.html index.htm index.php /_h5ai/public/index.php;\n"
/* error pages section */
"error_page 404 /404.html;\n"
"error_page 500 502 503 504 /50x.html;\n"

@ -180,7 +180,7 @@ function init() {
{ title: 'Upload file size limit', name: 'nginx_upload', type: 'text', maxlen: 5, size: 7, value: nvram.nginx_upload, suffix: '<small> MB<\/small>'},
{ title: 'Allow Remote Access', name: 'f_nginx_remote', type: 'checkbox', value: nvram.nginx_remote == '1' },
{ title: 'Web Server Name', name: 'nginx_fqdn', type: 'text', maxlen: 255, size: 20, value: nvram.nginx_fqdn },
{ title: 'Document Root Path', name: 'nginx_docroot', type: 'text', maxlen: 255, size: 40, value: nvram.nginx_docroot, suffix: '<small>&nbsp;/index.html / index.htm / index.php<\/small>' },
{ title: 'Document Root Path', name: 'nginx_docroot', type: 'text', maxlen: 255, size: 40, value: nvram.nginx_docroot, suffix: '<small>&nbsp;/index.html / index.htm / index.php / /_h5ai/public/index.php<\/small>' },
{ title: 'Server Priority', name: 'nginx_priority', type: 'text', maxlen: 8, size:3, value: nvram.nginx_priority, suffix:'<small> Max. Perfor: -20, Min.Perfor: 19, default: 10<\/small>' }
]);
</script>

Loading…
Cancel
Save