Section 15.1. Defining a Remote Site


15.1. Defining a Remote Site

As you create your Web site on your computer, you keep it in a local site folder (see Section 13.1.1.7), often called a local site for short. You can think of a local site as a work-in-progress. As your site is under constructionwhether you're building it from scratch or adding and modifying pagesyou'll routinely have partially finished documents sitting on your computer.

Then, when you've perfected and tested your pages using the techniques described in Chapter 14, you're ready to transfer them to a Web server that's connected to the Internet. Dreamweaver calls the Web server copy of your files the remote site , and the program provides five methods for transferring files between it and your local site:

  • FTP . By far, the most common method is FTP , or File Transfer Protocol. Just as HTTP is the process by which Web pages are transferred from servers to Web browsers, FTP is the traditional method of transferring files over the Internet, and it's the one to use if a Web hosting company or Internet Service Provider (ISP) provides the home for your Web pages.

  • Over the local area network . If you're working on an intranet, or if your company's Web server is connected to the company network, you may also be able to transfer files just as you would any files on your office network (using the Network Neighborhood, My Network Places, or Connect to Server command, depending on your operating system), without even connecting to the Internet.

  • The last three options RDS, SourceSafe, and WebDAV are advanced file management systems used for collaborative Web development. They're discussed on Section 15.1.3.

15.1.1. Setting Up a Remote Site with FTP

You can set up a remote site only if you've first set up a local site on your computer. Even if you're just putting up a temporary site while working on your real Web site, you must at least have the temporary site constructed and defined in Dreamweaver (see Section 13.1.1).

FREQUENTLY ASKED QUESTION
Beyond Dreamweaver

Do I have to use Dreamweaver to move my files to the Web server ?

No. If you're used to using another program for this purpose, such as CuteFTP (Windows) or RBrowser (Mac), you can continue to use it and ignore Dreamweaver's Remote Site feature.

However, if you've never before used Dreamweaver to move files to a server, you may want to at least try it; you'll find that Dreamweaver simplifies much of the process. For example, when you want to move a file from your computer to the Web server using a regular FTP program, you must first locate the file on your local machine and then navigate to the proper folder on the Web server. Dreamweaver saves you both steps; when you select the file in the Files panel and click the Put button, Dreamweaver automatically locates the file on your computer and transfers it to the correct folder on the Web server.



Note: Dreamweaver lets you edit directly on pages located on a Web server, using an FTP connection (or if you're working with ColdFusion files, an RDS connection). This feature isn't always the best way to go: it's slow and leaves your works-in-progress open for the world to see on the Internet.

Once that's done, here's how you go about creating an Internet-based mirror of your local site folder:

  1. Choose Site Manage Sites .

    The Manage Sites dialog box opens, listing all sites that you've defined so far. You're about to create a living, Internet-based copy of one of these hard drivebased local sites.

  2. Click the name of the site you want to post on the Internet, and then click Edit .

    Alternatively, just double-click the site name in the list. The Site Definition window appears for the selected site, as shown in Figure 15-1.


    Note: You can also define the remote site and the local site simultaneously , when you first begin creating a Web site (as described on Section 13.1.1). Even then, however, Dreamweaver requires that you first give the site a name and choose a local root folder. At that point, you rejoin the steps described here.
    Figure 15-1. If a Web hosting company or ISP hosts your Web site, you'll most likely use FTP to put your site on the Web. To make sure you have all the information you need to connect to the Web server, ask your ISP for these four pieces of information: (1) the FTP host name of the server, (2) the path to the root directory for your site, (3) your login name, and (4) your password. (If the Web server comes with your email account, your login and password may be the same for both.)
  3. Click the Advanced tab .

    You can also use the Site Definition Wizard (Basic tab) to set up a remote site. However, since the wizard requires you to step through screen after screen of setup informationeven after you've already supplied most of itthe Advanced tab is faster.

  4. In the Category panel, click Remote Info . From the Access pop-up menu, choose FTP .

    The Site Definition window now shows menus and fields for collecting your connection information (see Figure 15-1).

  5. Fill in the "FTP host" field .

    Your FTP host name may be a name like www.nationalexasperator.com or ftp.nationalexasperator.com. It never includes directories, folders, or slashes (like www.nationalexasperator.com/home); never includes codes for the FTP protocol (ftp://ftp.nationalexasperator.com); and is never only a domain name, such as nationalexasperator.com . It can also be an IP address, like 64.226.43.116 . In most cases, it's the address you would enter into a Web browser (minus the http:// ) to get to your site's home page.

    If you don't know the host name, there's only one way to find out: call or email your Web hosting company or ISP, or check its Web site.

  6. In the Host Directory field, type the path to the root directory .

    You're specifying which folder within your Web hosting account will contain your Web page files and serve as the root folder for your site.

    Just as on your own hard drive, all the files of your Web site on the Web are completely contained inside a master folder referred to as the root folder . But when you connect to your Web server using FTP, you're rarely connected to the root folder itself. Instead, you usually connect to a folder that isn't accessible over the Websome administrative folder for your Web account, often filled with folders for log reports of your site's Web traffic, databases, and other files not visible over the Web.

    Your hosting account's root directory folder (or even a folder within it) is where you place your site's root folder; that's why you're typing its name here. Common names for the root folder at ISPs or Web hosting companies are docs, www, htdocs, public_html, or virtual_html . (Call or email your Web hosting company or ISP to find out.)

    The information you give Dreamweaver here represents the path from the FTP folder to the root folder. It may look like this: www/htdocs . In effect, you're telling Dreamweaver: "After connecting to the Web server, you'll find a folder named www . Inside this folder is another folder, htdocs . Put my site files in there." In other words, htdocs is the Web site's root folder on this particular remote hosting account.

  7. In the Login field, type your user name; type your password in the Password field .

    Dreamweaver uses bullets ( ) to display your password so that passing evildoers in your office can't see what you're typing.

    If you want Dreamweaver to remember your password each time you use the program, turn on the Save checkbox. This way, you won't have to type your password each time you connect to the Web server.


    Warning: For security reasons, don't turn on the Save box if you access the Web using computers at, say, your local library, or anywhere else where people you don't trust may use the machine. Otherwise, you might just awaken one morning to find the following splattered across your home page: "Hi there! Welcome to Jack's house of illegally acquired and unlawfully distributed music, featuring Metallica's greatest hits."
  8. Turn on the "Use passive FTP" or "Use firewall" boxes, if necessary .

    If you're building sites from your home, home office, or small company, you may never need to use these technical options.

    Many corporations, however, use firewalls : hardware- or software-based gateways that control incoming and outgoing traffic through a network. Firewalls protect the company network from outside hackers; unfortunately , they also limit how computers inside the network behind the firewall can connect to the outside world.

    If your company's system administrator confirms that you have a firewall, you'll need to also get the name of the firewall host computer and its port number. Click the Firewall Settings button, which opens the Site Preferences dialog box). Your firewall configuration may also require passive FTP a method of connecting using your local software, rather than the firewall server. Check with your administrator to see if this is the case, and, if so, turn on the "Use passive FTP" checkbox.

  9. If your Web server uses SFTP (a secure, encrypted form of FTP), turn on the Use Secure FTP (SFTP) box .

    Secure FTP encrypts all of your data, not just your user name and password, so information transferred in this way is unintelligible to Internet snoops . It's ideal if your site isn't open to the public (password-protected) and contains sensitive information like personnel records. Unfortunately, not all Web hosting companies offer this advanced option.

    By the way, leave "Automatically upload files to server on save" turned off. Because it makes Dreamweaver upload the file each time you save, it slows you down and runs the risk of putting half-finished Web pages on your server for all the world to see. It's better to just upload the page after you're completely finished with it.

  10. Leave the Server Compatibility options alone .

    That big Server Compatibility button is useful when you're having trouble connecting to the server or moving files to the server. Dreamweaver, out of the box, is tuned to make FTP run as fast as possible, so leave these options alone, unless you're having trouble. If you are having trouble connecting to your server, click this button and turn off the "Use FTP performance optimization" box.

    If everything's okay when you're connecting to your server, but you're getting errors when moving files between your computer and the server, you should turn on the "Use alternative FTP move method" box. This method is slower but more reliable. It's also handy if you use Macromedia's Contribute program and are taking advantage of the "rollback" feature (to learn more about Contribute, visit www.macromedia.com/contribute).

  11. If you don't want to synchronize files, turn off the "Maintain synchronization information" box .

    Dreamweaver's synchronization feature has been greatly improved in Dreamweaver 8. It helps you maintain the most recent versions of a file on the remote server, by keeping track of when you've changed a file on your computer. When you synchronize a site, Dreamweaver can move the more recent files onto the Web server. This feature is described in detail on Section 15.4. If you don't use synchronization, definitely turn off this checkbox. When this feature is on, Dreamweaver inserts little files named dwsync.xml throughout your site in folders named _notes . These items keep track of synchronization information about each file in your site, but there's no need to clutter things up with these files if you don't use synchronization.

  12. Turn on "Enable file check in and check out," if you like .

    Turn it on if, for example, you and your team of Web developers all use Dreamweaver. Then fill in the corresponding options as explained in Figure 15-2.

    If you do wind up using the "checking out" feature (see Section 15.3), you can save yourself some clicks by turning on "Check out files when opening." (Fill in your name and email address, too, as shown in Figure 15-2.) Now you can "check out" a file from the remote server just by double-clicking its name in the Site Files list.

    Figure 15-2. If you're using Dreamweaver's Check In/Check out feature and you work on your site in several different locations (for example, from home and your office), use a different name for each location (BobAtHome and BobAtWork, for example). In this way, you can identify which files you've checked out to your home computer and which to your computer at work.
  13. Click the Test button to see if Dreamweaver can connect to the Web server .

    If everything goes according to plan, you'll see a "Dreamweaver connected to your Web server successfully" message. If not, you'll get an "FTP error" message with some additional information that can help you determine the problem (see the box on Section 15.2.3).

  14. Click OK to return to the Manage Sites dialog box; click Done .

    The Manage Sites dialog box closes , and the Files panel opens.

At this point, you're ready to connect to the Web server and transfer files. If you're the only person working on the site, Dreamweaver's Get and Put commands will do the trick (Section 15.2). If, however, you're part of a development team, use Dreamweaver's Check In and Check Out feature, described on Section 15.3.

FREQUENTLY ASKED QUESTION
When Your Remote Site Is Too Remote

Help! I can't connect to my Web server. What should I do ?

Things don't always go smoothly. That's doubly true when trying to connect to a Web server, since you depend on a variety of thingsyour Internet connection, the networks connecting you to your Web server, the Web server itself, and the FTP softwareworking together in harmony. Dreamweaver presents an error message if you can't successfully establish an FTP connection with your Web server. The error box frequently contains useful information that can help you determine the problem. Here are some of the most common:

  • Remote host cannot be found usually means you typed an incorrect FTP Host address (step 5 on Section 15.1.1).

  • Your login or password is incorrect means just thatyou've typed the wrong user name or password (step 7 on Section 15.1.1.).

  • Cannot open remote folder usually means you mistyped or input the wrong Host directory (step 6 on Section 15.1.1).

Unfortunately, there are lots of reasons Dreamweaver may not be able to connect, so sometimes the error message isn't particularly helpful. Here are a few other suggestions for troubleshooting: make sure you're connected to the Internet (open a Web browser and see if you can visit a site on the Web); return to the Remote Info category of the Site Definition window, click the Server Compatibility button, and then turn off the "Use FTP performance optimization" box; turn on the "Use passive FTP" option (sometimes this just makes things work); and if you have another FTP program like CuteFTP or RBrowser, see if you can connect to your Web server using the same settings you gave Dreamweaver. If all these steps fail, you can visit this page on the Macromedia Web site for additional troubleshooting tips: www.macromedia.com/support/dreamweaver/ts/documents/troubleshooting_ftp.htm.


15.1.2. Setting Up a Remote Site over a Local Network

If you're working on an intranet, or if your company's Web server is connected to the company network, you may also be able to transfer your Web files just as you'd move any files from machine to machine. Dreamweaver provides the same file-transfer functions as with FTP, but setup is simpler.

Follow steps 1 and 2 of the previous instructions, but in step 4, click the Remote Info category and then choose Local/Network from the Access pop-up menu. Menus and fields for collecting your connection information appear in the Site Definition box (see Figure 15-3).

Now click the folder icon next to the "Remote folder" field. In the resulting dialog box, navigate to and select your site's remote root folder. On a local network, this folder functions as the root folder on your company's Web server (see Section 13.1.1.7), even though it's actually still within the walls of your building. (For differences on selecting root folders on Windows and Macs, see Section 1.3.2.)

Wrap up with steps 10, 11, 12, and 14 of the previous instructions. At this point, you're ready to connect to the Web server and transfer files.

Figure 15-3. Turning on the "Refresh remote file list automatically" box updates the list of files in the Files panel. Changes to the remote site, such as when someone adds a file, are then listed automatically. Because automatic updating slows down the process of moving files to the remote site, however, you may want to turn off this option when you begin a session of moving many files. You can always refresh the file list manually by clicking the Refresh button on the Files panel (see Figure 13-13 on Section 13.3).

15.1.3. Setting Up a Remote Site with RDS

RDS (Remote Development Services) is a feature of Macromedia's ColdFusion Server. It lets designers work on Web files and databases in conjunction with a ColdFusion application server. If you aren't using ColdFusion, then this option isn't for you.

To create a remote site in Dreamweaver that works with RDS, follow steps 1 through 3 on Section 15.1.1. In step 4, click the Remote Info category, and then choose RDS from the Access pop-up menu.

The Site Definition window displays a version number, a short description, and a Settings button. Click Settings to open the Configure RDS Server window, shown in Figure 15-4. Fill in the dialog box as directed by your server administrator or help desk.

Figure 15-4. Remote Development Services is a feature of the ColdFusion application server. However, even if you use ColdFusion, you may not be able to use RDS, since most Web hosting companies that offer ColdFusion servers turn off RDS due to potential security problems.

15.1.4. Setting Up a Remote Site with WebDAV

Dreamweaver also allows access to a remote site using WebDAV , short for Web-based Distributed Authoring and Versioning. Like FTP, it's a method, or protocol, for transferring files. Like SFTP, it lets you use a secure connection (SSL or Secure Socket Layer) so that all of your data is encrypted as it passes back and forth between your computer and the Web server. But unlike both of those technologies, WebDAV also addresses the kinds of problems you encounter when collaborating on a Web site with other people.


Note: WebDAV isn't a very common option at most Web hosting companies, where FTP is still the norm. So you may not be able to take advantage of this exciting technology. However, if you're a Mac fan and have an Apple .Mac account, your iDisk actually works using WebDAV, so you can connect to your .Mac Homepage files using Dreamweaver. (Even Windows owners can use Dreamweaver to work on a Web-DAV .Mac Web site.)

For instance, all kinds of havoc can result if two people edit a page simultaneously; whoever uploads the page to the Web server second winds up wiping out the changes made by the first person. WebDAV supports a check-in and check-out system that works similarly to Dreamweaver's Check In/Check Out tool (see Section 15.3) to make sure only one person works on a file at a time and no one tramples on anyone else's files. In fact, Dreamweaver's Check In and Check Out tools work seamlessly with WebDAV.

Both Microsoft Internet Information Server (IIS) and Apache Web Server can work with WebDAV. To find out if your Web server can handle WebDAV (and to find out the necessary connection information), consult your Web server's administrator (for example, call or email your Web hosting company).

Setting up WebDAV access to a remote site is very similar to setting up FTP access. Follow steps 1 through 3 on Section 15.1.1, and then follow these steps:

  1. Click the Remote Info category, and then choose WebDAV from the Access pop-up menu .

    The Site Definition window displays the WebDAV settings (Figure 15-5).

  2. In the URL box, type in the URL of the WebDAV server .

    In most cases, this is the URL of the Web site, so it begins with either http:// or https :// . The s in https means you'll connect securely to the Web server using SSL. The normal http:// method doesn't use any encryption, which means that, just like with regular FTP, your user name, password, and all data are sent "in the open" across the Internet. Note that just adding an s won't suddenly make your file transfers secure; the Web server needs to be set up to accept https connections (a technically challenging task).


    Note: .Mac account holders who want to connect to their Homepage Web site should type https://idisk.mac.com/UserName/Sites where "UserName" is your .Mac account name.
  3. In the Login field, type your user name; type your password in the Password field .

    Turn on the Save checkbox if you want to save yourself the hassle of having to type in your password each time you move files to your Web server (but heed the Warning on Section 15.1.1).

  4. Click the Test button to see if your connection works .

    If Dreamweaver succeeds, it proudly tells you. Unfortunately, if it fails, you'll get an error message that isn't exactly helpful. WebDAV isn't nearly as finicky as FTP, so if there's an error, you most likely just typed the URL, password, or login incorrectly, or WebDAV just isn't available for the server.

  5. Turn off the "Refresh remote file list automatically" option .

    This option works just like the one for local networks described in Figure 15-3.

  6. Leave the "Automatically upload files to server on save" box turned off .

    This option makes Dreamweaver upload the file each time you save; it slows you down and runs the risk of putting half-finished Web pages on your server for all the world to see. It's better to just upload the page after you're completely finished with it.

The rest of the process is identical to the FTP setup process, so follow steps 11, 12, and 14, starting on Section 15.1.1. You're ready to connect to the Web server and transfer files, as described on Section 15.2.


Note: You can find more information on WebDAV at www.webdav.org/.
Figure 15-5. WebDAV, short for Web-based Distributed Authoring and Versioning, is a powerful tool for working on a site with other people. It's built into several Web server packages but, unfortunately, isn't a very common option at most Web hosting companies.

15.1.5. Setting Up a Remote Site with SourceSafe

Microsoft originally created Visual SourceSafe for managing team software development. Like WebDAV, SourceSafe makes sure you don't accidentally stomp on someone else's hard work by overwriting a Web page they just modified. In addition, this sophisticated program tracks different versions of files and lets an administrator "roll back" to previous versions of a Web page, or even an entire site; it's the granddaddy of Undos.

To take advantage of this power, however, you need a Visual SourceSafe (VSS) server and VSS database already setup. In addition, Windows people need to install Microsoft Visual SourceSafe Client version 6 on their PCs.


Note: The Visual SourceSafe option isn't available in the Mac version of Dreamweaver 8.

Once you've installed the VSS Client software, and you've created and defined a local site (see Section 13.1.1), you're ready to configure Dreamweaver for SourceSafe using the Site Definition window. Basically, you tell Dreamweaver where to find the SourceSafe database and how to sign on to the server.

Once again, follow steps 1 though 3 on Section 15.1.1. But in step 4, click the Remote Info category, and then choose Microsoft Visual SourceSafe from the Access pop-up menu. In the resulting dialog box, click Settings to reveal the Open Microsoft Visual SourceSafe Database dialog box, shown in Figure 15-6.

Figure 15-6. This window, sometimes called the "Microsoft's Lawyers Are Everywhere " dialog box, lets you set up Dreamweaver for use with Microsoft's Visual SourceSafe system. Many corporations use this powerful file-control system to control access to files in large projects involving many people.

Click Browse to select the Visual SourceSafe (VSS) database file on your computer (or type in the file path, if you know it, into the Database Path field)the srcsafe.ini file that Dreamweaver uses to initialize SourceSafe.

Then, in the Project field, fill in the name of the project within the VSS database that you wish to use as the remote root folder. (A VSS database can have many projects and Web sites listed in it. Make sure you enter the correct project name for this site. If in doubt, contact the administrator of the Visual SourceSafe database.) Type your user name and password into the appropriate fields; again, ask the administrator for guidance.

Click OK. But before dismissing the Site Definition dialog box, turn on Check Out Files when Opening, so that Dreamweaver's Check In and Check Out features (see Section 15.3) work with the VSS system. Click OK, and then click Done.



Dreamweaver 8[c] The Missing Manual
Dreamweaver 8[c] The Missing Manual
ISBN: 596100566
EAN: N/A
Year: 2006
Pages: 233

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net