Skip to content

Commit

Permalink
Attempted to fix nginx configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuvious committed Nov 23, 2023
1 parent 29924a6 commit 4efe425
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ RUN apt-get update && \
# Install apt-mirror components and cron
RUN apt-get install apt-mirror gnupg xz-utils cron -y

# Enable cron updates
# Enable cron updates and copy nginx configuration
COPY apt-mirror.cron /etc/cron.d/apt-mirror
COPY default.conf /etc/nginx/conf.d/default.conf

# Link apt-mirror data directory to /var/www/html
RUN rm -rf /usr/share/nginx && \
Expand Down
22 changes: 22 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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;
autoindex on;
}

#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;
}
}

0 comments on commit 4efe425

Please sign in to comment.