Skip to content

Commit

Permalink
Add nginx config and docker updates for dev.iscsc.fr
Browse files Browse the repository at this point in the history
  • Loading branch information
ctmbl committed Apr 26, 2024
1 parent c157dfb commit 502fd1b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ certbot/*

# hugo build
src/public
build/blog/*
build/*

# python
**/__pycache__
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ services:
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./build/blog:/blog:rw
- ./build/blog:/blog/prod:rw
- ./build/dev:/blog/dev:rw

certbot:
image: certbot/certbot:latest
Expand Down
30 changes: 27 additions & 3 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
listen 80;
listen [::]:80;

server_name www.iscsc.fr iscsc.fr;
server_name dev.iscsc.fr www.iscsc.fr iscsc.fr;

location /.well-known/acme-challenge/ {
root /var/www/certbot;
Expand All @@ -28,17 +28,41 @@ http {
}
}

server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;

server_name dev.iscsc.fr;

ssl_certificate /etc/nginx/ssl/live/dev.iscsc.fr/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/dev.iscsc.fr/privkey.pem;

root /blog/dev; #Absolute path to where your hugo site is
index index.html; # Hugo generates HTML

location / {
try_files $uri $uri/ =404;
}

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


server {
listen 443 default_server ssl http2;
listen [::]:443 ssl http2;

server_name www.iscsc.fr iscsc.fr;
server_name iscsc.fr;

ssl_certificate /etc/nginx/ssl/live/iscsc.fr/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/iscsc.fr/privkey.pem;

root /blog; #Absolute path to where your hugo site is
root /blog/prod; #Absolute path to where your hugo site is
index index.html; # Hugo generates HTML

location / {
Expand Down

0 comments on commit 502fd1b

Please sign in to comment.