For the first one, the correct link is:
https://m-labs.hk/migen/manual/ (with a slash at the end)
The corresponding nginx syntax is:
location /migen/manual/ {
alias /var/www/m-labs.hk.old/migen/manual/;
}
Do you know the correct nginx configuration for accepting both URLs and without this issue? I couldn't figure it out and got frustrated with it.