Trying to make our redeploy scenario deploy with 0 seconds downtime on apache/php/codeigniter we do the following:
We send a zip files to the server and unzips them in a new appfolder /app_timestamp
We overwrite the existing apache conf for the (only virtual host info) pointing to /app_timestamp
We trigger an /etc/init.d/apache2 reload to reload the configuration.
Everything works perfect except that a user already on the site suffers a 404 error after deployment. If the user closes his browser and opens up the same url again it starts working again.