1. Home
  2. Knowledge Base
  3. Various
  4. Ghostlab 1: Legacy Documentation
  5. Site Configuration – Fine-tuning Ghostlab Internals

Site Configuration – Fine-tuning Ghostlab Internals

You can configure every site in Ghostlab with various settings. All sites have default settings – you can change these in the Ghostlab preferences.

In the Site configuration tab, you can set the document root and the title under which the site is displayed in your site list.

In the Watch Files tab, you can configure if the server should keep track of any changes in a directory and cause the clients to reload the page on such changes. You can filter changes by file type via the extensions field. If you leave it empty, Ghostlab will cause a reload on changes to any files (including adding and deleting files). If you chose to limit the reload to changes on certain types of files, please provide a comma-separated list of extensions, each denoted by a dot plus the extension (e.g. ‘.jpg, .jpeg, .html’).
If you are serving a site from a local directory, the associated directory defaults to the directory of the site. If you serve a site via HTTP from a local or a remote host, there is no default associated directory. You can associate any directory on your filesystem with the site and tell Ghostlab to watch for changes in that directory.


In The File charsets tab, you can specify in which encoding your files are saved. Note that this only applies to sites that are based on a local folder.


In the Content Loading tab, you can specify how Ghostlab clients load their resources. There are two options.

The Load all content through Ghostlab causes the server to rewrite the URLs to all resources so that they are loaded through Ghostlab. This is helpful if resources have a restriction on the referer – a good example are Typekit fonts. If you do not load Typekit fonts through Ghostlab and do not configure them to be served via your Ghostlab IP, they will not show up. If you choose to load them through Ghostlab, they will. Note that loading all resources through Ghostlab will have a performance impact, since all the clients will load all content through one single server.

The Add random query parameters option will cause Ghostlab clients to add a random query parameter to all the resources they request (as long as they match the extensions you are free to provide). By doing this, these resources will bypass the browser cache. Make sure you check this option if you want to force your clients to always reload the resources.


In the HTTP Headers tab, you can add or remove headers from the requests and responses made by this site. Note that in the general settings, you can set which default headers are added to or removed from the requests and responses of any new site.

In the Action column, you can specify whether the header in question should be added to or removed from the request or response. In the Type column, you can specify whether the setting or unsetting of the header applies to the requests to or the responses from this site.

You can also add an HTTP Auth header. If you have a site that is password protected via the .htaccess file, you can conveniently set the username and password that all devices connecting to the site via Ghostlab will use – no need to type in these details on every device!




Was this article helpful?

Related Articles