Configuring Synchronization with a Web Server
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, in the /htdocs folder), and you do your development directly 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.
AppCode distinguishes among in-place, local, and remote servers, however the meaning of these terms in the context of AppCode slightly differs from their common meaning:
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 (for example, in the /htdocs folder), 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. You do your development, then copy the sources to the server.
A remote server is a server running on another computer (remote host). Files on the server are accessible via the FTP/SFTP/FTPS protocol.
Server access configuration
AppCode controls interaction with web servers through server access configurations. Anytime you are going to use a server, you need to define a server access configuration, no matter whether your server is on a remote host or on your machine.
A server access configuration defines the following:
The server type (in-place, local, or remote).
The computer (host) where the server is running. For in-place and local servers, AppCode presupposes that it is the current computer where your project is.
The server access configuration root: the highest folder in the server hierarchy that can be accessed through the server configuration.
The URL address to access the server configuration root.
The protocol to transfer the data through and the connection parameters.
The correspondence between local folders (that is, the folders under the project root), destination folders on the server (either local or remote), and URL addresses to access the data on the server. This correspondence is called mapping.
For example, your project is stored under C:/Projects/My_Project/ and contains a folder C:/Projects/My_Project/My_Folder, while a local server has the document root under C:/xampp/htdocs. You upload the entire project tree to C:/xampp/htdocs/My_Project. In the AppCode terms, the C:/Projects/My_Project/My_Folder folder is referred to as local and the C:/xampp/htdocs/My_Project/My_Folder folder is referred to as remote.
You can define as many configurations as necessary, thus enabling flexible switching between upload/download setups.
If you need to deploy code to multiple servers, you can create a server group and avoid deploying to each server individually.
You can set a server configuration as default to have AppCode silently select it in the following cases: