# V-change-web-domain-docroot ScriptAlias behavior

**URL:** <https://forum.hestiacp.com/t/v-change-web-domain-docroot-scriptalias-behavior/22302>\
**Category:** Web\
**Created:** [October 15, 2026, 2:13pm UTC](https://forum.hestiacp.com/t/v-change-web-domain-docroot-scriptalias-behavior/22302 "2026-10-15T14:13:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarsonW](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/c/9fc348/32.png) [@CarsonW](https://forum.hestiacp.com/u/CarsonW)\
**Post date:** [October 15, 2026, 2:13pm UTC](https://forum.hestiacp.com/t/v-change-web-domain-docroot-scriptalias-behavior/22302/1 "2026-10-15T14:13:15Z")

</div>

When using `v-change-web-domain-docroot` to change a VirtualHost’s DocumentRoot it looks like ScriptAlias is left off, or is this a design choice?

If you do:

`v-change-web-domain-docroot example1 alias.net parent.net`

This correctly changes the DocumentRoot in the Apache configuration:

`DocumentRoot /home/example1/web/parent.net/public_html/`

But leaves the cgi-bin ScriptAlias:

`ScriptAlias /cgi-bin/ /home/example1/web/alias.net/cgi-bin/`

Shouldn’t this be

`ScriptAlias /cgi-bin/ /home/example1/web/parent.net/cgi-bin/`

Otherwise cgi-bin requests are going to be different whether they are executed on `parent.net` or `alias.net` Or is there another reason for this?

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 15, 2026, 5:50pm UTC](https://forum.hestiacp.com/t/v-change-web-domain-docroot-scriptalias-behavior/22302/2 "2026-10-15T17:50:08Z")

</div>

> [@CarsonW](#):
>
> When using `v-change-web-domain-docroot` to change a VirtualHost’s DocumentRoot it looks like ScriptAlias is left off, or is this a design choice?

The command `v-change-web-domain-docroot` only changes the document root, it doesn’t change neither ScriptAlias nor other Alias. If you need something else, you could create a custom Apache template and modify the ScriptAlias to look like this:

For tpl:

```auto
ScriptAlias /cgi-bin/ %docroot%/../cgi-bin/

```

For stpl:

```auto
ScriptAlias /cgi-bin/ %sdocroot%/../cgi-bin/

```
