Understanding Virtual Directory on Linux

Article Number:01024
This section explains the Linux virtual directory, taking Cybozu Office as an example.

The "virtual directory" in Apache is defined as Script Alias (CGI executable directory) in the Apache configuration file "httpd.conf".

During the installation of the Cybozu, Inc. product, the installer displays the initial status of the installation directory in "Installation identifier settings" and "CGI directory settings".

The "(CGI directory)/(installation identifier)" is the initial status of the installation directory.

When you install the Cybozu, Inc. product to a location that is different from the default directory that is displayed in the installer, the specified directory must be set as "Script Alias" in "httpd.conf".

Example: When you configure the installation directory and the access URL as follows

  • Installation directory: /cgi/cybozu/cbag
  • Access URL: http://(server name)/cybozu/cbag/ag.cgi?

Add the following lines to "httpd.conf".
ScriptAlias /cybozu/ "/cgi/cybozu/"
<Directory "/cgi/cybozu">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptsAlias directives as to
# Alias.
# ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
# < Directory "/var/www/cgi-bin">
#    AllowOverride None
#    Options ExecCGI
#    Order allow,deny
# < /Directory>
######################################
ScriptAlias /cybozu/ "/cgi/cybozu/"
<Directory "/cgi/cybozu">
  AllowOverride None
  Options ExecCGI
  Order allow,deny
  Allow from all
</Directory>
######################################

The settings you have changed are applied after you restart Apache.
As described above, the directory that has been set as "Script Alias" in "httpd.conf" can be specified as the installation destination during the installation ("Installation identifier settings" and "CGI directory settings").