Share via


Zen Cart のサンプル - manifest.xml ファイル

公開日: 2009 年 7 月 9 日 (作業者: stjacobs (英語))

更新日: 2009 年 7 月 9 日 (作業者: stjacobs (英語))

これは、Zen Cart を IIS に展開するときに使用できる manifest.xml ファイルのサンプルです。このファイルには、構成に合わせて変更する必要があるファイル内の特定の行に、コメントで注釈が付けられています。

サンプル manifest.xml ファイル

<msdeploy.iisapp>
  <!-- iisapp path identifies the subdirectory in the ZIP file which
  contains all of the application files
  -->
  <iisApp 
    path="zen-cart"
    />
  <!-- dbmysql path identifies the SQL script file that will be executed
  for database setup.  In this app's case, the script is being used
  to create the database user for the application
  -->
  <dbmysql 
    path="install.sql" 
    commandDelimiter="//" 
    removeCommandDelimiter="true" 
    />
  <!-- alias is used to make a copy of a distribution file to a location
  where it will be used.  Note that when you specify the Application
  name in the "to" attribute, you should specify the full path using
  the value of iisapp above for the root.  Alias doesn't actually
  copy the file within the package.  It creates an alias to the
  original file using the new file's path and name.  This alias then
  gets copied to the file system as if it were a real file within
  the package
  -->
  <!-- #Zen Cart
  You could use MS Deploy to ask the questions and populate the
  configuration.php file.  I don't recommend it for Zen Cart, as I think
  that the install routine you have handles that well.  This file needs to
  be created and writable however.  There are two choices for this.  The 
  first is to use this alias command to make a copy of the distribution
  configuration.  The second is to set an ACL on the file.  If the file
  doesn't exist, the setAcl provider will create an empty file, similar
  to the way the linux 'touch' command works.
  -->
  <!--
  <alias
    from="zen-cart/configuration.php-dist"
    to="zen-cart/configuration.php" />
  -->
  <!-- setAcl with a setAclResourceType of "File" is used to set the access
  privileges for a file within the application.  In this case, the
  ACL is being set on the configuration file that was created after the
  alias above was copied to disk.  This will enable the application to
  write to the configuration file as needed.  
  -->
  <!-- #Zen Cart
  As mentioned above, the best way to create the configuration file
  and make it writable is to just use this setACL directive.  This
  SetAcl directive will create the file empty, with permissions that
  allow PHP to write to it, so the installation routine can update the
  file.
  -->
  <setAcl 
          path="zen-cart/admin/includes/configuration.php"
          setAclResourceType="File"
          setAclAccess="Modify"
          setAclUser="anonymousAuthenticationUser" 
          />

  <setAcl 
          path="zen-cart/includes/configuration.php"
          setAclResourceType="File"
          setAclAccess="Modify"
          setAclUser="anonymousAuthenticationUser" 
          />

  <!-- setAcl with no setAclResourceType set will default to setting an ACL
  on a directory.  We are setting an ACL here for the files directory.
  This directory is used to store files that are uploaded for the
  application
  -->
  <!-- #Zen Cart -
  This ACL sets up the cache directory with all the privileges needed for
  Zen Cart to be able to create the files and directories used.
  -->

  <setAcl 
          path="zen-cart/cache" 
          setAclUser="anonymousAuthenticationUser" 
          setAclAccess="Modify" 
          />

  <setAcl 
          path="zen-cart/images" 
          setAclUser="anonymousAuthenticationUser" 
          setAclAccess="Modify" 
          />

  <setAcl 
          path="zen-cart/includes/languages/english/html_includes" 
          setAclUser="anonymousAuthenticationUser" 
          setAclAccess="Modify" 
          />

  <setAcl 
          path="zen-cart/media" 
          setAclUser="anonymousAuthenticationUser" 
          setAclAccess="Modify" 
          />

  <setAcl 
          path="zen-cart/pub" 
          setAclUser="anonymousAuthenticationUser" 
          setAclAccess="Modify" 
          />

  <setAcl 
          path="zen-cart/admin/backups" 
          setAclUser="anonymousAuthenticationUser" 
          setAclAccess="Modify" 
          />

  <setAcl 
          path="zen-cart/admin/images/graphs" 
          setAclUser="anonymousAuthenticationUser" 
          setAclAccess="Modify" 
          />

  <!-- NOTE - with setAcl, the setAclUser can be explicitly set, or you can
  use the alias 'anonymousAuthenticationUser'.  This should be used in
  all situations, unless your application has a dependency on a specific
  OS user for access to these resources.

  Modify access includes Read and Write as well.  For a full breakdown
  on user rights, check out this article on MSDN:
  https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemrights.aspx
  -->

</msdeploy.iisapp>