This repository currently backs two live DSG websites:
https://dsgiitr.in/https://dsg.iitr.ac.in/
They serve the same Jekyll content, but they are not hosted the same way.
- URL:
https://dsgiitr.in/ - Current delivery path:
Cloudflare -> GitHub Pages - DNS for
dsgiitr.incurrently resolves to Cloudflare IPs. - The source repo for that site is this repo.
- The repo-level
CNAMEmust staydsgiitr.inso GitHub Pages keeps serving the public domain correctly. - The default Jekyll config in
_config.ymlis intentionally set tohttps://dsgiitr.in.
- URL:
https://dsg.iitr.ac.in/ - Current delivery path:
AWS EC2 -> Nginx -> static files in /var/www/dsg-site - EC2 public IP:
3.110.75.251 - SSH user:
ubuntu - Site root on the server:
/var/www/dsg-site - Nginx vhost:
/etc/nginx/sites-available/dsg - TLS certificate:
/etc/ssl/certs/dsg_iitr_ac_in_fullchain.crt/etc/ssl/private/dsg_iitr_ac_in.key
dsg.iitr.ac.in uses IITR's wildcard certificate for *.iitr.ac.in, so this domain must be built with the IITR hostname, not the public hostname.
The IITR-specific hostname override lives in _config.iitr.yml.
- Ruby and Bundler installed
- A working native build toolchain for gems
This repo is a Jekyll site built on the Minimal Mistakes theme.
Install dependencies:
bundle installRun locally:
bundle exec jekyll serve --livereloadThat serves the site locally at http://127.0.0.1:4000.
Use the default config:
JEKYLL_ENV=production bundle exec jekyll build --destination _site_publicUse the IITR override config:
JEKYLL_ENV=production bundle exec jekyll build --config _config.yml,_config.iitr.yml --destination _site_iitrThat override keeps content shared while changing the generated absolute URLs and canonical metadata to the IITR hostname.
The public website is currently the GitHub Pages copy of this repository, fronted by Cloudflare.
Typical update flow:
- Make content or layout changes in this repo.
- Commit and push to
master. - Let GitHub Pages rebuild the site.
- If Cloudflare caches an old page, purge cache there if needed.
Important:
- Keep
CNAMEasdsgiitr.in. - Keep
_config.ymlpointing tohttps://dsgiitr.in. - Do not point the public build at
dsg.iitr.ac.in, or GitHub Pages pages will emit the wrong canonical URLs.
The IITR website is a static copy deployed manually to the EC2 instance.
Recommended flow:
- Build the IITR version locally.
- Copy the generated files to the EC2 instance.
- Sync them into
/var/www/dsg-site. - Ensure ownership stays
www-data:www-data. - Validate and reload Nginx.
Example commands:
JEKYLL_ENV=production bundle exec jekyll build --config _config.yml,_config.iitr.yml --destination _site_iitr
rsync -avz --delete _site_iitr/ ubuntu@3.110.75.251:/tmp/dsg-site/
ssh -i /path/to/your/key.pem ubuntu@3.110.75.251Then on the server:
sudo rsync -av --delete /tmp/dsg-site/ /var/www/dsg-site/
sudo chown -R www-data:www-data /var/www/dsg-site
sudo nginx -t
sudo systemctl reload nginxCurrent behavior on the EC2 instance:
http://dsg.iitr.ac.inredirects tohttps://dsg.iitr.ac.inhttps://dsg.iitr.ac.inserves the site from/var/www/dsg-sitehttp://3.110.75.251serves the same static site directly
If you change the IITR virtual host, re-check:
sudo nginx -t
sudo systemctl reload nginx
curl -I http://127.0.0.1
curl -Ik https://127.0.0.1As of April 6, 2026, the EC2 host firewall (ufw) was blocking direct IITR/public traffic because only Cloudflare IP ranges were allowed on 80/443. That was fixed by allowing 80/tcp and 443/tcp on the instance itself.
Important operational rule:
- Let AWS security groups enforce the network policy.
- Do not re-introduce Cloudflare-only
ufwrules unless the IITR deployment is intentionally moved behind Cloudflare as well.
The intended split from the IITR mail thread is:
- Port
80: campus-network access policy handled upstream in AWS/IITR - Port
443: public HTTPS access
- Edit
_config.ymlfor shared site settings and the public domain. - Edit
_config.iitr.ymlonly for IITR-host-specific overrides. - Edit
CNAMEonly if the public GitHub Pages custom domain changes. - Edit EC2 Nginx only when the IITR deployment path, server names, or certificate files change.
dsgiitr.in= public site, GitHub Pages + Cloudflare, default repo configdsg.iitr.ac.in= EC2/Nginx site, built with_config.iitr.yml- Shared content = this repo
- Public hostname default stays in
_config.yml - IITR hostname override stays in
_config.iitr.yml