Commit 9d1e7e3 1 parent 2561740 commit 9d1e7e3 Copy full SHA for 9d1e7e3
File tree 4 files changed +109
-0
lines changed
4 files changed +109
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
3
+ fastcgi_param QUERY_STRING $query_string;
4
+ fastcgi_param REQUEST_METHOD $request_method;
5
+ fastcgi_param CONTENT_TYPE $content_type;
6
+ fastcgi_param CONTENT_LENGTH $content_length;
7
+
8
+ fastcgi_param SCRIPT_NAME $fastcgi_script_name;
9
+ fastcgi_param REQUEST_URI $request_uri;
10
+ fastcgi_param DOCUMENT_URI $document_uri;
11
+ fastcgi_param DOCUMENT_ROOT $document_root;
12
+ fastcgi_param SERVER_PROTOCOL $server_protocol;
13
+ fastcgi_param REQUEST_SCHEME $scheme;
14
+ fastcgi_param HTTPS $https if_not_empty;
15
+
16
+ fastcgi_param GATEWAY_INTERFACE CGI/1.1;
17
+ fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
18
+
19
+ fastcgi_param REMOTE_ADDR $remote_addr;
20
+ fastcgi_param REMOTE_PORT $remote_port;
21
+ fastcgi_param SERVER_ADDR $server_addr;
22
+ fastcgi_param SERVER_PORT $server_port;
23
+ fastcgi_param SERVER_NAME $server_name;
24
+
25
+ # PHP only, required if PHP was built with --enable-force-cgi-redirect
26
+ fastcgi_param REDIRECT_STATUS 200;
27
+ fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
Original file line number Diff line number Diff line change
1
+ # nginx.conf -- docker-openresty
2
+ #
3
+ # This file is installed to:
4
+ # `/usr/local/openresty/nginx/conf/nginx.conf`
5
+ # and is the file loaded by nginx at startup,
6
+ # unless the user specifies otherwise.
7
+ #
8
+ # It tracks the upstream OpenResty's `nginx.conf`, but removes the `server`
9
+ # section and adds this directive:
10
+ # `include /etc/nginx/conf.d/*.conf;`
11
+ #
12
+ # The `docker-openresty` file `nginx.vh.default.conf` is copied to
13
+ # `/etc/nginx/conf.d/default.conf`. It contains the `server section
14
+ # of the upstream `nginx.conf`.
15
+ #
16
+ # See https://github.com/openresty/docker-openresty/blob/master/README.md#nginx-config-files
17
+ #
18
+
19
+ #user www-data;
20
+ worker_processes 1;
21
+
22
+ error_log /var/log/nginx/openresly.error.log warn;
23
+ #error_log logs/error.log notice;
24
+ #error_log logs/error.log info;
25
+
26
+ #pid logs/nginx.pid;
27
+
28
+
29
+ events {
30
+ worker_connections 1024;
31
+ }
32
+
33
+
34
+ http {
35
+ include mime.types;
36
+ default_type application/octet-stream;
37
+
38
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
39
+ '$status $body_bytes_sent "$http_referer" '
40
+ '"$http_user_agent" "$http_x_forwarded_for"'
41
+ '"$request_body" $request_time $upstream_response_time';
42
+
43
+ access_log logs/access.log main;
44
+
45
+ #隐藏版本号
46
+ server_tokens off;
47
+ sendfile on;
48
+ #tcp_nopush on;
49
+
50
+ #keepalive_timeout 0;
51
+ keepalive_timeout 65;
52
+
53
+ #gzip on;
54
+
55
+ include /etc/nginx/conf.d/*.conf;
56
+ }
Original file line number Diff line number Diff line change @@ -16,6 +16,24 @@ services:
16
16
networks :
17
17
- default
18
18
19
+ # #Openresty与nginx只能二选一
20
+ # #Openresty and nginx can only choose one from the other
21
+ openresty :
22
+ image : openresty/openresty:${OPENRESTY_VERSION}
23
+ ports :
24
+ - " ${OPENRESTY_HTTP_HOST_PORT}:80"
25
+ - " ${OPENRESTY_HTTPS_HOST_PORT}:443"
26
+ volumes :
27
+ - ${SOURCE_DIR}:/var/www/html/:rw
28
+ - ${OPENRESTY_CONFD_DIR}:/etc/nginx/conf.d/:ro
29
+ - ${OPENRESTY_CONF_FILE}:/usr/local/openresty/nginx/conf/nginx.conf:ro
30
+ - ${OPENRESTY_CONF_FASTCGIPARAMS_FILE}:/usr/local/openresty/nginx/conf/fastcgi_params:ro
31
+ - ${OPENRESTY_LOG_DIR}:/var/log/nginx/:rw
32
+ environment :
33
+ TZ : " $TZ"
34
+ networks :
35
+ - default
36
+
19
37
php72 :
20
38
build :
21
39
context : .
Original file line number Diff line number Diff line change @@ -19,6 +19,14 @@ NGINX_CONFD_DIR=./conf/conf.d
19
19
NGINX_CONF_FILE=./conf/nginx.conf
20
20
NGINX_LOG_DIR=./log/nginx
21
21
22
+ #################### Openresty #####################
23
+ OPENRESTY_VERSION=alpine
24
+ OPENRESTY_HTTP_HOST_PORT=80
25
+ OPENRESTY_HTTPS_HOST_PORT=443
26
+ OPENRESTY_CONFD_DIR=./conf/conf.d
27
+ OPENRESTY_CONF_FILE=./conf/openresty.conf
28
+ OPENRESTY_CONF_FASTCGIPARAMS_FILE=./conf/fastcgi_params
29
+ OPENRESTY_LOG_DIR=./log/nginx
22
30
23
31
############ PHP extensions #################
24
32
# Available extensions:
You can’t perform that action at this time.
0 commit comments