Init
This commit is contained in:
5
.docker/nginx/Dockerfile
Normal file
5
.docker/nginx/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM nginx:alpine
|
||||
#COPY ./ /var/www/html/
|
||||
CMD ["nginx"]
|
||||
|
||||
EXPOSE 80 443
|
||||
3
.docker/nginx/conf.d/default.conf
Normal file
3
.docker/nginx/conf.d/default.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
upstream php-upstream {
|
||||
server php:9000;
|
||||
}
|
||||
24
.docker/nginx/nginx.conf
Normal file
24
.docker/nginx/nginx.conf
Normal file
@@ -0,0 +1,24 @@
|
||||
user nginx;
|
||||
worker_processes 4;
|
||||
daemon off;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stderr;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-available/*.conf;
|
||||
}
|
||||
28
.docker/nginx/sites/default.conf
Normal file
28
.docker/nginx/sites/default.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
server {
|
||||
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
|
||||
server_name localhost;
|
||||
root /var/www/html/www/;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri /index.php =404;
|
||||
fastcgi_pass php-upstream;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_read_timeout 600;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user