summaryrefslogtreecommitdiff
path: root/source4/web_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/web_server')
-rw-r--r--source4/web_server/http.c6
-rw-r--r--source4/web_server/web_server.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index ad7eaa8ead..61ed685361 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -250,7 +250,7 @@ static const char *http_local_path(struct websrv_context *web, const char *url)
}
}
- path = talloc_asprintf(web, "%s/%s", lp_swat_directory(), url+1);
+ path = talloc_asprintf(web, "%s/html/%s", lp_swat_directory(), url+1);
if (path == NULL) return NULL;
if (directory_exist(path)) {
@@ -275,7 +275,7 @@ static void http_simple_request(struct websrv_context *web)
/* looks ok */
web->output.fd = open(path, O_RDONLY);
if (web->output.fd == -1) {
- http_error_unix(web, url);
+ http_error_unix(web, path);
return;
}
@@ -354,7 +354,7 @@ static void esp_request(struct esp_state *esp)
/* looks ok */
fd = open(path, O_RDONLY);
if (fd == -1) {
- http_error_unix(web, url);
+ http_error_unix(web, path);
return;
}
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index 9d161bdd8a..656e101c11 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -202,7 +202,7 @@ static const struct stream_server_ops web_stream_ops = {
static void websrv_task_init(struct task_server *task)
{
NTSTATUS status;
- uint16_t port = lp_swat_port();
+ uint16_t port = lp_web_port();
const struct model_ops *model_ops;
/* run the web server as a single process */