Redirect root site to other site location = / { return 301 http://www.example.com/wiki/Main_Page; } Redirect root site to subdirectory in nginx location = / { return 301 https://$host/wal; }