AppCode 2017.3 Help

Deployment


Basics

On this page, create, edit, and delete server access configurations that give you control over interaction between AppCode and servers. Anytime you are going to use a server, you need to define a server access configurations, no matter whether your server is on a remote host or on your computer.

Among numerous ways to configure your development and production environments the most frequent ones are as follows:

  • The Web server is installed on your computer. The sources are under the server document root (for example, /htdocs), and you do your development right on the server.
  • The Web server is installed on your computer but the sources are stored in another folder. You do your development, then copy the sources to the server.
  • The Web server is on another computer (remote host). Files on the server are available through the FTP/SFTP/FTPS protocol, through a network share, or a mounted drive.

Let's define the terms and their meaning in the context of synchronization between AppCode and servers.

  • An in-place server is a server whose document root is the parent of the project root, either immediate or not. In other words, the Web server is running on your computer, your project is under its document root, and you do your development directly on the server.
  • A local server is a server that is running in a local or a mounted folder and whose document root is NOT the parent of the project root.
  • A remote server is a server on another computer (remote host).
  • The server configuration root is the highest folder in the file tree on the local or remote server accessible through the server configuration. For in-place servers, it is the project root.
  • A local file/folder is any file or folder under the project root.
  • A remote file/folder is any file or folder on the server, either local or remote.

    Suppose you have a project C:/Projects/My_Project/ with a folder C:/Projects/My_Project/My_Folder and a local server with the document root in C:/xampp/htdocs. You upload the entire project tree to C:/xampp/htdocs/My_Project. In the terms of AppCode, the folder C:/Projects/My_Project/My_Folder is referred to as local and the folder C:/xampp/htdocs/My_Project/My_Folder is referred to as remote.

  • Upload is copying data from the project TO the server, either local or remote.
  • Download is copying data FROM the server to the project.

Synchronization with servers, uploading, downloading, and managing files on them are provided via the Remote Hosts Access bundled plugin, which is by default enabled. If the plugin is disabled, activate it in the Plugins page of the Preferences dialog box. For details, see Enabling and Disabling Plugins.

Toolbar and common options

Use the toolbar buttons to manage the list of configurations.

The left-hand pane shows a list of all the server access configurations available in AppCode. When you select a configuration, the right-hand pane shows the configuration details.

ItemTooltip and shortcutDescription
add.png Add
⇧⌫
Click this button to open the Add Server dialog box and define a new configuration there.
delete.png Delete
Click this button to remove the selected configuration from the list.
copy.png Copy
⌘D
Click this button to copy the settings of the selected configuration.
icon_use_web_server_configuration_as_default.png Use as Default Click this button to have AppCode apply the settings of the selected configuration by default during automatic upload of changed files.

Connection tab

Use this tab to choose the way to access the Web server and specify the connection settings.

ItemDescription
Name The text box shows the configuration name specified in the dialog box. Edit the configuration name, if necessary.
Visible only for this project Use this checkbox to configure the visibility of the server access configuration (deployment configuration).
  • Select the checkbox to restrict the use of the configuration to the current project. Such configurations cannot be reused outside the current project, they do not appear in the list of available configurations in other projects. For example, if this checkbox is selected in an SFTP configuration, you cannot use your SSH credentials from it when you configure a remote interpreter.
  • When the checkbox is cleared, the configuration is visible in all AppCode projects and the settings from, including SSH credentials, can be reused.
See for details.
Access type From this drop-down list, choose the way to access the server. Use the Up and Down keyboard keys to scroll through the list of server configuration types. The available options are:
  • FTP: choose this option to have AppCode access the server via the FTP file transfer protocol.
  • SFTP: choose this option to have AppCode access the server via the SFTP file transfer protocol.
  • FTPS: choose this option to have AppCode access the server via the FTP file transfer protocol over SSL (the FTPS extension).
  • Local or mounted folder: choose this option if the Web server is running in a local or a mounted folder and its document root is NOT the parent of the project root.
  • In-place: choose this option if the Web server is running on your computer, your project is under its document root, and you do your development directly on the server.

Upload/Download Project Files

In this area, specify the settings for accessing the server to upload and download files to and from.

The set of controls in the area depends on the chosen server access type.

ItemDescriptionAvailable for
FTP/FTPS/SFTP hostIn this text box, specify the host name of the FTP/SFTP server to upload the files to.FTP, FTPS, SFTP
PortIn this text box, specify the port to use. The default values are:
  • 21 for FTP and FTPS
  • 22 for SFTP
FTP, FTPS, SFTP
Root Path In this text box, specify the server configuration root relative to your user home which was defined when you registered your account. This folder will be the highest one in the folder structure accessible through the current server configuration. Do one of the following:
  • Accept the default value /, which points at the user home folder on the server.
  • Type the path manually.
  • Click the Browse button browseButton.png and select the desired folder in the Choose Root Path dialog box that opens.
  • Click the Autodetect button and have AppCode detect the user home folder settings on the FTP/SFTP server and set up the root path according to them. The button is only enabled when you have specified your user name and password.
FTP, FTPS, SFTP
AutodetectClick this button to have AppCode detect the user home folder settings on the FTP/SFTP server and set up the root path according to them.FTP, FTPS, SFTP
User name In this text box, type your user name for authentication to the server.

The button is only enabled when you have specified your user credentials.

FTP, FTPS, SFTP
Log in as anonymousSelect this checkbox to enable anonymous access to the server with your email address as password.FTP, FTPS, SFTP
PasswordIn this text box, type your password for authentication to the server.FTP, FTPS, SFTP
Save passwordSelect this checkbox to have AppCode remember the specified password.FTP, FTPS, SFTP
Advanced options Click this button to specify additional uploading settings in the Advanced Options dialog box that opens. FTP, FTPS, SFTP
Web server root URL In this text box, specify the URL address of the Web server root folder. Both the HTTP and the HTTPS protocols are supported.

To access a server through HTTPS, you need to acquire a certificate file <certificate_name>.cert signed by a recognized authority and import this certificate in the truststore/keystore of the Oracle JRE (Java Runtime Environment) on which AppCode runs. Note that self-signed certificates are rejected as unsafe.

To import a certificate in Oracle JRE:

  1. Open the embedded Terminal and type the following command:
    <jre_home>/bin/keytool.exe -importcert -keystore <path to jre truststore/keystore> -file <full_path_to_<cert_name>.cert>
    If you are using the Oracle JRE bundled with AppCode, the default path to the truststore/keystore is <%product_installation_folder>/jre/jre/lib/security/jssecacerts or <%product_installation_folder>/jre/jre/lib/security/cacerts.

    Otherwise it is <jre_home>/jre/lib/security/jssecacerts or <jre_home>/jre/lib/security/cacerts.

  2. When asked to enter a password for the truststore/keystore, specify the default one changeit.
  3. Open the AppCode.exe.vmoptions file in the <AppCode_installation_folder>/bin and add the following line to it:
    -Djavax.net.ssl.keyStore=<path to keystore>
  4. Restart AppCode.

Learn more at Java6 and Java7.

All

Mappings tab

In this tab, configure mappings, that is, set correspondence between the project folders, the folders on the server to copy project files to, and the URL addresses to access the copied data on the server. The easiest way is to map the entire project root folder to a folder on the server, whereupon the project folder structure will be repeated on the server, provided that you have selected the Create Empty directories checkbox in the Options dialog box. "For more details, see Customizing Upload/Download. Below are definitions of terms used in this topic in the context of of synchronization between AppCode and servers.

  • A local server is a server that is running in a local or a mounted folder and whose document root is NOT the parent of the project root.
  • A remote server is a server on another computer (remote host).
  • The server configuration root is the highest folder in the file tree on the local or remote server accessible through the server configuration. For in-place servers, it is the project root.
  • A local file/folder is any file or folder under the project root.
  • A remote file/folder is any file or folder on the server, either local or remote.

    Suppose you have a project C:/Projects/My_Project/ with a folder C:/Projects/My_Project/My_Folder and a local server with the document root in C:/xampp/htdocs. You upload the entire project tree to C:/xampp/htdocs/My_Project. In the terms of AppCode, the folder C:/Projects/My_Project/My_Folder is referred to as local and the folder C:/xampp/htdocs/My_Project/My_Folder is referred to as remote.

ItemDescription
Use this server as defaultClick this button to have AppCode apply the settings of the selected configuration by default during automatic upload of changed files. This button is only enabled for the non-default servers; for the server used as default, this button is disabled.
Local PathIn this text box, specify the full path to the desired folder in the project tree. In the simplest case it is the project root. Type the path manually or click the Browse button browseButton.png and select the desired location in the Choose Local Path dialog box that opens.
Deployment Path In this text box, specify the folder on the server where AppCode will upload the data from the folder specified in the Local Path text box. Type the path to the folder relative to the server configuration root. If the folder with the specified name does not exist yet, AppCode will create it, provided that you have selected the Create Empty directories checkbox in the Options dialog box. For more details, see Customizing Upload/Download. The text box is not available for server configurations of the type In-place.
Web Path In this text box, type the path to the folder on the server relative to the server configuration root. Actually, type the relative path you typed in the Deployment Path text box.
Add another mappingClick this button to have a new line added to the list of mappings.

Excluded Paths

Use this tab to configure a list of local and remote folders that you do not want to be involved in upload/download.

ItemDescription
Add local path Click this button to have an empty line added to the list and specify the location of the folder to be protected against upload/download. Type the path manually or click the Browse button browseButton.png and choose the required folder in the dialog that opens.
Add deployment path Click this button to have an empty line added to the list. Click the Browse button browseButton.png. The Select remote excluded path dialog box that opens shows the data on the host accessed through the selected server configuration. Select the required folder.
Remove path Click this button to remove the selected item from the list. The button is only available when a line is selected.
Last modified: 27 March 2018