mirror of
https://github.com/cupcakearmy/docker-nginx-static-server.git
synced 2024-12-21 07:46:29 +00:00
Server
This commit is contained in:
commit
af19fbeb56
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
server:
|
||||
image: nginx:alpine
|
||||
restart: always
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./:/srv
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
2
dockerfile
Normal file
2
dockerfile
Normal file
@ -0,0 +1,2 @@
|
||||
FROM nginx:alpine
|
||||
|
36
nginx.conf
Normal file
36
nginx.conf
Normal file
@ -0,0 +1,36 @@
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
gzip on;
|
||||
|
||||
server{
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
root /srv;
|
||||
autoindex on;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user