> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/get-started/faq/changing-the-http-data-directory.md).

# Changing the HTTP data directory

World's #1 PDF SDK Library for Web, Mobile, Server, Desktop

### Changing the directory

If you are running WVS >= 2.4.0 you can achieve this by simply setting \`TRN\_DATA\_STORAGE\_DIR

\`The instructions are only applicable under these conditions: **Windows only (WVS <= 2.4.0) & Docker <=1.5.6**

1. Create a `static_data` directory in your new data location.
2. **Windows only (WVS <= 2.4.0) & Docker <=1.5.6** Modify the file at `WEBVIEWER_INSTALL/apache-tomcat/conf/server.xml` and look Context docBase argument for `/data`, replace it with this.

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
<Context docBase="[YOUR NEW DATA PATH]:/static_data" path="/data" />
```

{% endcode %}
{% endtab %}
{% endtabs %}

1. Modify the file at `WEBVIEWER_INSTALL/apache-tomcat/wvs_config.json`, change the next line into the following line:`"TRN_DATA_STORAGE_DIR":"WEBVIEWER_INSTALL/apache-tomcat/static_data",`
2. Start WebViewer Server, it should now write its cache to your networked drive.

### Using a networked drive

To use a networked drive on Windows, follow the same steps as above except specify your network path.

When using WVS with the Windows installer, it is possible to run its cache on a shared network drive. There can be many complications and considerations when using a network drive. The following are some things you should consider.

* Is the networked drive fast enough to keep WebViewer Server performant?
* Does the network drive maintain good cache consistency? A common symptom of this issue is WebViewer Server being unable to find files it just wrote when making a call on one server and accessing the result with another
* Does the network drive have correct permissions?

### My service won't startup after moving WebViewer Server to a networked drive

This is because the System user that WVS is running as does not have access to the network drive map. We must force the drive to be mapped on system startup so that the System user has access to it. The following steps detail that process. It may be possible to change the service user and get the mapped drives working, however, this is the only way we were able to get the networked drive to work with a service.

1. Write a batch file that can be used to mount your networked drive on startup.

{% tabs %}
{% tab title="Batch" %}
{% code lineNumbers="true" %}

```batch
echo %time% >> c:\mount_nfs_log.txt
net use Z: \\{your ip}\{netdisk folder} /USER:username password >> C:\mount_nfs_log.txt 2>&1
```

{% endcode %}
{% endtab %}
{% endtabs %}

1. Open your Task Scheduler and create a new task. This task should run as the NT SYSTEM user. The trigger should be system startup and the action should call the batch script you created in the previous steps.
2. Restart your system, when WebViewer Server next starts, it will have access to this drive.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/web/get-started/faq/changing-the-http-data-directory.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
