dongqiaochi2711 2011-10-14 14:03
浏览 64
已采纳

apache2 reload导致404直到重新打开浏览器

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.

  • 写回答

1条回答 默认 最新

  • dp7311 2011-10-14 14:11
    关注

    Instead of having the apache conf point to /app_timestamp, have it point to /app_latest and create /app_latest to be a symlink to /app_timestamp. When deploying a new package, unzip as before into /app_timestamp. Then simply move the symlink to point to the new /app_timestamp. No apache reload required.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大