-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
54 lines (39 loc) · 1.37 KB
/
nginx.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
user www-data;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 1;
keepalive_requests 1;
client_body_buffer_size 1100;
client_body_temp_path /client_body_temp_path;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx-access.log;
error_log /var/log/nginx-error.log debug;
server {
listen 8080;
server_name localhost;
pgcopy_server db_pub "host=127.0.0.1 dbname=ngx_pgcopy_test_db user=ngx_pgcopy_test_usr password=123";
pgcopy_server db_prv "host=127.0.0.1 dbname=ngx_pgcopy_test_db" Basic;
location /pub {
pgcopy_query PUT db_pub "COPY input_test FROM STDIN WITH DELIMITER ';';";
pgcopy_query GET db_pub "COPY input_test TO STDOUT WITH DELIMITER ';';";
}
location /prv {
pgcopy_query PUT db_prv "COPY input_test FROM STDIN WITH DELIMITER ';';";
pgcopy_query GET db_prv "COPY input_test TO STDOUT WITH DELIMITER ';';";
}
location /err {
pgcopy_query GET db_pub "COPY input_test_no TO STDOUT WITH DELIMITER ';';";
}
location /null {
pgcopy_query GET db_pub "COPY (select * from input_test where cid=333) TO STDOUT WITH DELIMITER ';';";
}
}
}