Here's a quick overview of the information that makes up a site:
- Nickname
- A short name for the site, just for your reference.
- Root URL
- The root URL for the web site. This will be used to generate a thumbnail image for the site, and as the base URL for previewing pages.
- Local URL
- This optional field will be used as the base URL for previewing local files, if desired.
- Remote Root
- The default web server folder you will be placed in upon connection to this site, and the base folder used for generating preview URLs.
- Local Root
- The local folder you will be placed in upon connection to this site.
- Server
- The address of the web server hosting the site.
- User Name
- The user name required to log into the web server hosting the site.
- Password
- The password required for the above user name.
- Port
- Which port to connect to for file transfers. This depends on which file transfer protocol is used, and in most cases does not need to be manually changed.
- Protocol
- The file transfer protocol to be used with the web server. FTP and SFTP are the most common.
- List Encoding
- The string encoding to use for file listings sent from the web server. Generally not used by English speakers.
- Use passive mode for data transfers
- (FTP protocol only) Determines whether Coda connects to the server for data transfers, or vice-versa.
- Prompt for password when connecting
- Check this box if you would prefer to store passwords in your brain than in your system keychain.
- SSH Server
- The address of an SSH server associated with this site. Generally, this is the same address as the web server.
- Port
- The port on which the SSH server accepts connections. The default is 22 and does not usually need to be changed.
- User Name
- The user name required to log into the SSH server.
- Password
- The password required for the above user name.
Understanding roots
Probably the most important items are the Root URL, and the Local and Remote Roots. When you connect to a site, Coda automatically sets the "Local" tab of the file browser to the Local Root folder, and (after connecting) the "Remote" tab to the Remote Root folder. The Root URL must be correct for previews to work properly.For example, on our web site,
/www/panic is the directory on the server where all of our HTML files live. This would be our Remote Root. Our Root URL would be http://panic.com/. Then if we edit a file under /www/panic, let's say /www/panic/coda/index.html, Coda's preview understands that it must now display http://panic.com/coda/index.html and everything magically works.(What about the Local Root? I don't keep a local copy of what's on the Panic server, but if I did, it might be something like
/Users/stevenf/Sites/Panic)We know that a lot of you have a private development web server installed on your local computer. In future versions of Coda, we're going to make that a bit easier to deal with, but as a workaround for now, note that it is possible to set your Root URL to
http://localhost/ and get most of the way there.How many sites should I make?
You can make as many or as few sites as you want. For example, if you have one server with five virtual hosts on it, you can either make a site for each virtual host, or you can make one site for the root of the web server, and navigate around as needed. It's up to your personal preference. Personally, I like to use a site for each domain name I maintain.If you prefer the other approach, one site for the entire server, you may benefit from an item in the General prefs: "Go to the last-opened folder when connecting". If you set this, Coda will remember where you left off if you change directories while connected to the server. Otherwise, you'll always be logged into the remote root path defined in the site.
Other little benefits of using sites
When you use a site, it helps Coda help you in other little ways. For example, when you open a Terminal tab while connected to a site, Coda has your login credentials, and can pre-fill the login form for you. It'll even change directory to your remote root path, since that's 90% of the time probably going to be where you were heading anyway.Getting thumbnails right
When you create a site, Coda takes a snapshot of the page at the Root URL and uses it as a thumbnail to help you identify the site visually.It's important to note that Transmit favorites don't have any notion of a Root URL, so when you import them, we have to guess at what the Root URL might be. We do this by looking at the server address. If we get it wrong, not to worry, just edit the site and type in a correct URL -- the thumbnail will be updated.
You can also pick any old image off your hard drive, if the thumbnail doesn't reflect your site as well as you'd like. Just select the site, and from the "action" button at the bottom of the sites view, choose "Change Image..."