First Upload
This commit is contained in:
9
README.md
Normal file
9
README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
Docker-Compose stack with nginx, this stack will expose the entire /etc/nginx folder, as well as the webroot html folder. See compose file for example
|
||||
|
||||
Copy .env.example to .env and define
|
||||
|
||||
HTTP_PORT=8888
|
||||
HTTPS_PORT=8889
|
||||
|
||||
|
||||
Use whatever ports you need to.
|
13
docker-compose.yaml
Normal file
13
docker-compose.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- ${HTTP_PORT}:80
|
||||
- ${HTTPS_PORT}:443
|
||||
volumes:
|
||||
- ./docker-persist/html:/usr/share/nginx/html #Expose HTML webroot to host
|
||||
- ./docker-persist/nginx:/etc/nginx #Expose nging conf folder to host
|
||||
- ./docker-persist/log:/var/log/nginx #Expose nginx log folder to host
|
||||
restart: always
|
23
docker-persist/html/index.html
Normal file
23
docker-persist/html/index.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome to nginx!</title>
|
||||
<style>
|
||||
html { color-scheme: light dark; }
|
||||
body { width: 35em; margin: 0 auto;
|
||||
font-family: Tahoma, Verdana, Arial, sans-serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to nginx!</h1>
|
||||
<p>If you see this page, the nginx web server is successfully installed and
|
||||
working. Further configuration is required.</p>
|
||||
|
||||
<p>For online documentation and support please refer to
|
||||
<a href="http://nginx.org/">nginx.org</a>.<br/>
|
||||
Commercial support is available at
|
||||
<a href="http://nginx.com/">nginx.com</a>.</p>
|
||||
|
||||
<p><em>Thank you for using nginx.</em></p>
|
||||
</body>
|
||||
</html>
|
2
docker-persist/log/access.log
Normal file
2
docker-persist/log/access.log
Normal file
@@ -0,0 +1,2 @@
|
||||
172.16.0.166 - - [26/Oct/2024:17:00:43 +0000] "GET / HTTP/1.1" 200 615 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0" "-"
|
||||
172.16.0.166 - - [26/Oct/2024:17:00:43 +0000] "GET /favicon.ico HTTP/1.1" 404 555 "http://172.16.1.65:9898/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0" "-"
|
105
docker-persist/log/error.log
Normal file
105
docker-persist/log/error.log
Normal file
@@ -0,0 +1,105 @@
|
||||
2024/10/26 16:59:57 [notice] 1#1: using the "epoll" event method
|
||||
2024/10/26 16:59:57 [notice] 1#1: nginx/1.27.2
|
||||
2024/10/26 16:59:57 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14)
|
||||
2024/10/26 16:59:57 [notice] 1#1: OS: Linux 5.15.0-122-generic
|
||||
2024/10/26 16:59:57 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker processes
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 22
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 23
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 24
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 25
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 26
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 27
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 28
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 29
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 30
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 31
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 32
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 33
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 34
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 35
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 36
|
||||
2024/10/26 16:59:57 [notice] 1#1: start worker process 37
|
||||
2024/10/26 17:00:43 [error] 22#22: *1 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 172.16.0.166, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "172.16.1.65:9898", referrer: "http://172.16.1.65:9898/"
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 3 (SIGQUIT) received, shutting down
|
||||
2024/10/26 17:00:55 [notice] 22#22: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 23#23: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 25#25: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 24#24: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 25#25: exiting
|
||||
2024/10/26 17:00:55 [notice] 24#24: exiting
|
||||
2024/10/26 17:00:55 [notice] 22#22: exiting
|
||||
2024/10/26 17:00:55 [notice] 25#25: exit
|
||||
2024/10/26 17:00:55 [notice] 22#22: exit
|
||||
2024/10/26 17:00:55 [notice] 24#24: exit
|
||||
2024/10/26 17:00:55 [notice] 26#26: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 34#34: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 26#26: exiting
|
||||
2024/10/26 17:00:55 [notice] 35#35: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 34#34: exiting
|
||||
2024/10/26 17:00:55 [notice] 30#30: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 35#35: exiting
|
||||
2024/10/26 17:00:55 [notice] 26#26: exit
|
||||
2024/10/26 17:00:55 [notice] 30#30: exiting
|
||||
2024/10/26 17:00:55 [notice] 34#34: exit
|
||||
2024/10/26 17:00:55 [notice] 35#35: exit
|
||||
2024/10/26 17:00:55 [notice] 30#30: exit
|
||||
2024/10/26 17:00:55 [notice] 29#29: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 29#29: exiting
|
||||
2024/10/26 17:00:55 [notice] 27#27: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 29#29: exit
|
||||
2024/10/26 17:00:55 [notice] 27#27: exiting
|
||||
2024/10/26 17:00:55 [notice] 27#27: exit
|
||||
2024/10/26 17:00:55 [notice] 32#32: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 31#31: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 31#31: exiting
|
||||
2024/10/26 17:00:55 [notice] 32#32: exiting
|
||||
2024/10/26 17:00:55 [notice] 37#37: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 32#32: exit
|
||||
2024/10/26 17:00:55 [notice] 31#31: exit
|
||||
2024/10/26 17:00:55 [notice] 37#37: exiting
|
||||
2024/10/26 17:00:55 [notice] 37#37: exit
|
||||
2024/10/26 17:00:55 [notice] 28#28: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 28#28: exiting
|
||||
2024/10/26 17:00:55 [notice] 33#33: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 28#28: exit
|
||||
2024/10/26 17:00:55 [notice] 33#33: exiting
|
||||
2024/10/26 17:00:55 [notice] 33#33: exit
|
||||
2024/10/26 17:00:55 [notice] 36#36: gracefully shutting down
|
||||
2024/10/26 17:00:55 [notice] 36#36: exiting
|
||||
2024/10/26 17:00:55 [notice] 36#36: exit
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 35
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 35 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 37
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 37 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 27
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 27 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 30
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 25 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 30 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 25
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 24 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 28 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 29 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 32 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 34
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 34 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 31
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 26 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 31 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 33
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 33 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 22
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 22 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 17 (SIGCHLD) received from 36
|
||||
2024/10/26 17:00:55 [notice] 1#1: worker process 36 exited with code 0
|
||||
2024/10/26 17:00:55 [notice] 1#1: signal 29 (SIGIO) received
|
45
docker-persist/nginx/conf.d/default.conf
Normal file
45
docker-persist/nginx/conf.d/default.conf
Normal file
@@ -0,0 +1,45 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# proxy_pass http://127.0.0.1;
|
||||
#}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# root html;
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# fastcgi_index index.php;
|
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
25
docker-persist/nginx/fastcgi_params
Normal file
25
docker-persist/nginx/fastcgi_params
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
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 SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_param DOCUMENT_URI $document_uri;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||
fastcgi_param REQUEST_SCHEME $scheme;
|
||||
fastcgi_param HTTPS $https if_not_empty;
|
||||
|
||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||
|
||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||
fastcgi_param REMOTE_PORT $remote_port;
|
||||
fastcgi_param SERVER_ADDR $server_addr;
|
||||
fastcgi_param SERVER_PORT $server_port;
|
||||
fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
99
docker-persist/nginx/mime.types
Normal file
99
docker-persist/nginx/mime.types
Normal file
@@ -0,0 +1,99 @@
|
||||
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
text/xml xml;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
application/javascript js;
|
||||
application/atom+xml atom;
|
||||
application/rss+xml rss;
|
||||
|
||||
text/mathml mml;
|
||||
text/plain txt;
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/x-component htc;
|
||||
|
||||
image/avif avif;
|
||||
image/png png;
|
||||
image/svg+xml svg svgz;
|
||||
image/tiff tif tiff;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
image/webp webp;
|
||||
image/x-icon ico;
|
||||
image/x-jng jng;
|
||||
image/x-ms-bmp bmp;
|
||||
|
||||
font/woff woff;
|
||||
font/woff2 woff2;
|
||||
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
application/msword doc;
|
||||
application/pdf pdf;
|
||||
application/postscript ps eps ai;
|
||||
application/rtf rtf;
|
||||
application/vnd.apple.mpegurl m3u8;
|
||||
application/vnd.google-earth.kml+xml kml;
|
||||
application/vnd.google-earth.kmz kmz;
|
||||
application/vnd.ms-excel xls;
|
||||
application/vnd.ms-fontobject eot;
|
||||
application/vnd.ms-powerpoint ppt;
|
||||
application/vnd.oasis.opendocument.graphics odg;
|
||||
application/vnd.oasis.opendocument.presentation odp;
|
||||
application/vnd.oasis.opendocument.spreadsheet ods;
|
||||
application/vnd.oasis.opendocument.text odt;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
pptx;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
xlsx;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
docx;
|
||||
application/vnd.wap.wmlc wmlc;
|
||||
application/wasm wasm;
|
||||
application/x-7z-compressed 7z;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot prc pdb;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert der pem crt;
|
||||
application/x-xpinstall xpi;
|
||||
application/xhtml+xml xhtml;
|
||||
application/xspf+xml xspf;
|
||||
application/zip zip;
|
||||
|
||||
application/octet-stream bin exe dll;
|
||||
application/octet-stream deb;
|
||||
application/octet-stream dmg;
|
||||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mp3;
|
||||
audio/ogg ogg;
|
||||
audio/x-m4a m4a;
|
||||
audio/x-realaudio ra;
|
||||
|
||||
video/3gpp 3gpp 3gp;
|
||||
video/mp2t ts;
|
||||
video/mp4 mp4;
|
||||
video/mpeg mpeg mpg;
|
||||
video/quicktime mov;
|
||||
video/webm webm;
|
||||
video/x-flv flv;
|
||||
video/x-m4v m4v;
|
||||
video/x-mng mng;
|
||||
video/x-ms-asf asx asf;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-msvideo avi;
|
||||
}
|
1
docker-persist/nginx/modules
Symbolic link
1
docker-persist/nginx/modules
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/nginx/modules
|
32
docker-persist/nginx/nginx.conf
Normal file
32
docker-persist/nginx/nginx.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
17
docker-persist/nginx/scgi_params
Normal file
17
docker-persist/nginx/scgi_params
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
scgi_param REQUEST_METHOD $request_method;
|
||||
scgi_param REQUEST_URI $request_uri;
|
||||
scgi_param QUERY_STRING $query_string;
|
||||
scgi_param CONTENT_TYPE $content_type;
|
||||
|
||||
scgi_param DOCUMENT_URI $document_uri;
|
||||
scgi_param DOCUMENT_ROOT $document_root;
|
||||
scgi_param SCGI 1;
|
||||
scgi_param SERVER_PROTOCOL $server_protocol;
|
||||
scgi_param REQUEST_SCHEME $scheme;
|
||||
scgi_param HTTPS $https if_not_empty;
|
||||
|
||||
scgi_param REMOTE_ADDR $remote_addr;
|
||||
scgi_param REMOTE_PORT $remote_port;
|
||||
scgi_param SERVER_PORT $server_port;
|
||||
scgi_param SERVER_NAME $server_name;
|
17
docker-persist/nginx/uwsgi_params
Normal file
17
docker-persist/nginx/uwsgi_params
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
uwsgi_param QUERY_STRING $query_string;
|
||||
uwsgi_param REQUEST_METHOD $request_method;
|
||||
uwsgi_param CONTENT_TYPE $content_type;
|
||||
uwsgi_param CONTENT_LENGTH $content_length;
|
||||
|
||||
uwsgi_param REQUEST_URI $request_uri;
|
||||
uwsgi_param PATH_INFO $document_uri;
|
||||
uwsgi_param DOCUMENT_ROOT $document_root;
|
||||
uwsgi_param SERVER_PROTOCOL $server_protocol;
|
||||
uwsgi_param REQUEST_SCHEME $scheme;
|
||||
uwsgi_param HTTPS $https if_not_empty;
|
||||
|
||||
uwsgi_param REMOTE_ADDR $remote_addr;
|
||||
uwsgi_param REMOTE_PORT $remote_port;
|
||||
uwsgi_param SERVER_PORT $server_port;
|
||||
uwsgi_param SERVER_NAME $server_name;
|
2
env.example
Normal file
2
env.example
Normal file
@@ -0,0 +1,2 @@
|
||||
HTTP_PORT=9898
|
||||
HTTPS_PORT=9899
|
Reference in New Issue
Block a user