# Trouble with capistrano "disable\_web" task on litespeed

**URL:** <https://www.ruby-forum.com/t/trouble-with-capistrano-disable-web-task-on-litespeed/107356>\
**Category:** Deployment\
**Created:** [June 20, 2007, 9:00pm UTC](https://www.ruby-forum.com/t/trouble-with-capistrano-disable-web-task-on-litespeed/107356 "2007-06-20T21:00:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 20, 2007, 9:00pm UTC](https://www.ruby-forum.com/t/trouble-with-capistrano-disable-web-task-on-litespeed/107356/1 "2007-06-20T21:00:33Z")

</div>

Hi,

When I run the capistrano “disable\_web” task, the file  
maintenance.html is copied into #{shared\_path}/system directory.

The symlink in application’s public directory that points to a  
#{shared\_path}/system directory works fine, because when I go to the  
url [http://myhost/system/maintenance.html](http://myhost/system/maintenance.html) the maintenance page is  
showed.

Also I added the rewrite rules to my Virtual Host:  
RewriteCond %{DOCUMENT\_ROOT}/system/maintenance.html -f  
RewriteCond %{SCRIPT\_FILENAME} !maintenance.html  
RewriteRule ^.\*$ /system/maintenance.html [L]

But when I go to my application [http://myhost](http://myhost) the maintenance page  
isn’t showed, instead the application is displayed right

any clue?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 20, 2007, 9:07pm UTC](https://www.ruby-forum.com/t/trouble-with-capistrano-disable-web-task-on-litespeed/107356/2 "2007-06-20T21:07:34Z")

</div>

> RewriteCond %{SCRIPT\_FILENAME} !maintenance.html  
> RewriteRule ^.\*$ /system/maintenance.html [L]
> 
> But when I go to my application [http://myhost](http://myhost) the maintenance page  
> isn’t showed, instead the application is displayed right
> 
> any clue?

Any chance that “Enable Rewrite” is set to no? At the top of the  
“Rewrite” tab for your virtual host?

That’s the only thing I can think of… either that or litespeed isn’t  
setting those %{} like you think they are.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 20, 2007, 9:33pm UTC](https://www.ruby-forum.com/t/trouble-with-capistrano-disable-web-task-on-litespeed/107356/3 "2007-06-20T21:33:37Z")

</div>

Philip,

Yes, the problem was in value on %{DOCUMENT\_ROOT}

## I changed to the full path and works fine
