Custom Index Page for Go Present


Go’s present tool really comes in handy when making some presentations. I’ve been using it heavily for the Japanese class I teach. It’s really a simplistic and easy to use piece of software.

My biggest problem is the index page. If I were doing talks on Go, I wouldn’t mind so much, but for my Japanese class it’s not really ideal. I wanted a way to host my slides without users getting confused by all the “Go Programming Language” or “Go Talks”. I could have created an index.html file and use a reverse proxy to route the present tool to /slides/* but then users might try and go to /slides and see the present tool’s index page.

I wanted a way to:

This proved to be harder than I thought. I was using nginx on my server and ended up achieving the desired result though a lot of keyboard slamming and guessing (also StackOverflow).


Here’s the nginx config file in sites-enabled

server {
  listen 80;
  listen [::]:80;


  root /opt/learn-japanese-slides;

  location = / {
    try_files /index.html =404;

  location / {
    proxy_set_header  Host $host;
    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  X-Forwarded-Proto $scheme;

    proxy_pass   http://localhost:3999;

It’s pretty helpful, I can keep my index.html in the root of my slide decks folder and commit it all at the same time. You can check it out in action at

Downsides to this Approach

In the original page, the slides are loaded dynamically. That is no longer the case. Now, every time I create a new slide deck, I have to manually create a link to it. Which isn’t too terrible. I can work on a slide deck and check it online before linking to it. Which has its benefits.


[1] How to set index.html as root file in Nginx?
[2] Apache + NginX reverse proxy: serving static and proxy files within nested URLs
[3] Directory Override with NGINX