WebFiles & Web Publishing

Mirroring your host file system inside your Web Crossing 5.0 site

Web and Host Filesystem Mappings
Listing/Hiding host filesystem Items via the Web
Editing WebFiles & Web Publishing
index.html and folders
Adding a new Web Page
Synchronizing WebFiles

WebFiles are an exciting new web serving paradigm, unique to Web Crossing 5.0. Conceptually simple and tremendously powerful, WebFiles are a complete mirror of your Web Crossing 5.0 host filesystem inside Web Crossing itself.

Using WebFiles you can access and edit any Web Crossing site file, including templates, directly via the web. Along with the new built-in Web Publishing feature, you can even create and edit entire home page directories via the web interface.

All filesystem changes made using WebFiles or the new Web Crossing 5.0 internal FTP service, are automatically synchronized in real time with the Web Crossing 5.0 native object-oriented database. And since all filesystem folders and files are now Web Crossing objects, you can easily add access lists and even object properties to any item in your filesystem! These are unique, powerful concepts new to web serving and we look forward, with great excitement, to all the uses made of these new features by Web Crossing 5.0 site administrators and developers.

Web and Host Filesystem Mappings

For the most part, finding host files from within Web Crossing 5.0 is natural and obvious. But a few concepts are worth going over. Keeping these points in mind will make it easy when looking for host files from within Web Crossing 5.0 and when looking for Web Crossing 5.0 folders when accessing via the built-in FTP server.

  1. The root level (top level) of your server refers both to top level Web Crossing 5.0 folders and also to the files and folders which are in your webx/html directory. This has always been true, but with Web Crossing 5.0 you can actually see these items via the web - as Web Crossing 5.0 WebFiles. Also, you can see all the folders you create inside Web Crossing 5.0 when accessing via the new built-in FTP service.
  2. The webx directory is mapped to a top level directory called system.
  3. The webxTemplates directory is mapped to a top level directory called templates.

The following table of examples shows the relationship between the underlying filesystem, Web Crossing 5.0 folders and how they are all mapped for web/ftp access.

The / symbol represents your Web Crossing 5.0 server's root directory. Via the web, for example, /MyForum represents http://yourdomain.com/MyForum. Via ftp this represents ftp://yourdomain.com/MyForum (an FTP client would see the folder MyForum at the top level when accessing).

Filesystem Mappings

item

location in host filesystem

location via the web or ftp

a top level Web Crossing folder "MyForum"

not accessible - exists inside webx.db

/MyForum

a sub-folder of "MyForum", "SubForum"

not accessible - exists inside webx.db

/MyForum/SubForum

a file readme.html in the root "html" directory

webx/html/readme.html

/readme.html

webx.log

webx/webx.log

/system/webx.log

webx.tpl

webx/webxTemplates/webx.tpl

/templates/webx.tpl

Listing/Hiding host filesystem items via the Web

In order not to interfere with ordinary folder and discussion views, host filesystem directories and files do not, by default, appear in folder listings. The sysop and folder hosts can, however, always see all the WebFiles in a folder by clicking on the List all Contents link (or button - depending on which Toolbar component you have installed), as shown in figures 1 and 2.

Figure 1 - default view without WebFiles

Figure 2 - after clicking the "List All Contents" link

Note that after clicking on List All Contents that the underlying host filesystem folders and files are visible via the web. In other words, the WebFiles are listed.

In the example shown in figure 2, plugins is a folder containing files which support the new automated plugins and software updating feature; Images is the folder containing all your site images and documentation; templates is the folder where all your default and customized template files reside, including webx.tpl; system is the folder containing the Web Crossing 5.0 database (webx.db), log files, setting files, server binaries and other system files; test.html is a sample HTML source file and robots.txt is a file that blocks web crawlers from scanning your site.

You can control the default show/hide behavior for WebFiles in WebFiles in Edit Folder > Other Folder Settings > Basic folder appearance and hidden files, as shown in figure 3.

Figure 3 - showing/hiding webfiles for all users

The List items in this folder option is the traditional Web Crossing option for turning on and off folder listings. You might want to turn off that option if you have a customized folder macro that otherwise takes over the display of the folder.

By default, Show web files in this folder is turned off. If it is turned on, everybody will see the filesystem host files and folders in ordinary folder listings, just as if the List all Contents link had been clicked.

The Hidden/Not Hidden selection hides (but does not change access list permissions for) the current folder within its parent folder listing. In other words, the current folder will not appear in web and ftp listings but access to the folder, and listing of its contents is still possible, depending on the user's permissions.

Editing WebFiles & Web Publishing

One of the most powerful capabilities of WebFiles is that you can edit the files directly via the web. In traditional web servers, even a minor change to a file requires that you (1) download the file; (2) edit the file; (3) upload the file and (4) reset the file cache. With Web Crossing 5.0 WebFiles you can simply click on the Edit button, as shown in figure 3, edit the file and save it. As experienced sysops will immediately grasp, this is an enormous convenience and time saver.

Figure 4 - editing files via the web

Note that not only can you edit the contents of a file directly, you also have the following options:

  1. You can modify the file name.
  2. You can set the content-type for the file.
  3. You can choose to replace the file with one you upload.
  4. You can upload additional files to the same folder.

Using all these features you can completely maintain site home page files and other files via the web. If you grant members host privileges for a folder, that folder can become that member's home page, which the member can maintain via the web, or by using the built-in FTP service.

index.html and folders

If a folder contains a file named index.html that file becomes the default view for that folder, overriding folder listings and all default views. You can use this feature to create home pages for virtual forums, members and for any location at your site, including the top level folder.

Adding a new Web Page

Clicking on the Add Web Page link/button will let you directly add a new WebFile to the current folder, as shown in figure 5.

Figure 5 - adding a new web page

Synchronizing WebFiles

When filesystem changes are made via either the Web Crossing 5.0 web interface or via Web Crossing's built-in FTP service the filesystem contents are automatically and instantly synchronized with the Web Crossing 5.0 web contents. Under normal operating conditions, you would never have to manually resynchronize the files.

However, if you make modifications to the filesystem outside Web Crossing 5.0 services (for example, at a terminal window, or through an external FTP server), then you must click on Control Panel > Resynch to host filesystem in order for the file changes to be recognized by your Web Crossing server. A resynchronization also takes place during the daily, scheduled backup.