diff --git a/proxy/caddy/Caddyfile b/proxy/caddy/Caddyfile index 3b06def..7b20b5d 100644 --- a/proxy/caddy/Caddyfile +++ b/proxy/caddy/Caddyfile @@ -66,7 +66,10 @@ @www host www.{$DOMAIN} handle @www { - reverse_proxy webserver-www:80 + file_server { + root /usr/share/caddy + hide .git Readme.md + } } @mail host mail.{$DOMAIN} diff --git a/proxy/docker-compose.yaml b/proxy/docker-compose.yaml index 5de558d..1670926 100755 --- a/proxy/docker-compose.yaml +++ b/proxy/docker-compose.yaml @@ -14,6 +14,8 @@ services: - $PWD/caddy/Caddyfile:/etc/caddy/Caddyfile - ${STORAGE_PATH}/caddy/data:/data - ${STORAGE_PATH}/caddy/config:/config + - ${WWW_PATH}:/usr/share/caddy:ro + environment: - NETCUP_CUSTOMER_NUMBER=${NETCUP_CUSTOMER_NUMBER} - NETCUP_API_KEY=${NETCUP_API_KEY} diff --git a/www/docker-compose.yaml b/www/docker-compose.yaml deleted file mode 100644 index 36be945..0000000 --- a/www/docker-compose.yaml +++ /dev/null @@ -1,21 +0,0 @@ -services: - - webserver-www: - image: nginx:stable - volumes: - - ${HTML}:/usr/share/nginx/html:ro - - $PWD/nginx.conf:/etc/nginx/nginx.conf:ro - networks: - - web - restart: unless-stopped - healthcheck: - test: ["CMD", "curl" ,"--fail", "localhost"] - interval: 5s - timeout: 3s - labels: - - "docker.group=www" - -networks: - web: - external: true - diff --git a/www/nginx.conf b/www/nginx.conf deleted file mode 100644 index 73d1ce1..0000000 --- a/www/nginx.conf +++ /dev/null @@ -1,67 +0,0 @@ -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; - ############################################ - 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; - } - - # hide .git folder - location ~ /\.git { - deny all; - return 404; - } - - location ~ /Readme.md { - deny all; - return 404; - } - - } - - # include /etc/nginx/conf.d/*.conf; -}