Port 80/TCP

iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.0.31:80
iptables -t nat -A POSTROUTING -p tcp --dport 80 -j MASQUERADE

Port 443/TCP

iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 192.168.0.31:443
iptables -t nat -A POSTROUTING -p tcp --dport 443 -j MASQUERADE