Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Dreamweaver Developer Center /

Using Subversion with Dreamweaver CS5 – Part 3: Configuring Apache with Subversion support

by Andrew Voltmer

Andrew Voltmer
  • ninevolt

Content

  • Creating the repository
  • Configuring Apache
  • Configuring Dreamweaver

Created

30 April 2010

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
collaboration content management Dreamweaver CS5 workflow

Requirements

Prerequisite knowledge

Knowledge of Adobe Dreamweaver and basic web design/development knowledge.

User level

All

Required products

  • Dreamweaver (Download trial)

Additional Requirements

Mac OS X 10.6.x

 

This is Part 3 in a three-part series on using Subversion with Dreamweaver CS5. Part 1 provides a general introduction to Subversion and the concept of version control systems. Part 2 shows you how to configure Dreamweaver CS5 to use a Subversion repository. This part explains how to create your own repository.

Note: This part is more advanced than the previous parts. It requires UNIX commands to configure your repository and set up Apache access on your local machine. A discussion on setting up Subversion using the built-in svn protocol is beyond the scope of this article. Please refer to the Where to go from here section at the end of this part for resources on configuring a Subversion server.

In this example, I will be setting up my Mac as a Subversion repository (it can be considered a server in the traditional client-server model). To do this I will depend on the fact that Apple, since Mac OS X 10.5, includes the Subversion binaries. If you have an older version of Mac OS X or are using Windows, you may want to go to the Subversion site or search the Internet for information on how to implement Subversion locally.

Creating the repository

The first step in creating a repository is selecting a location on your local hard disk where the repository files are kept. This is different than the location where you will keep your local client copies of your code. Remember, in this scenario your machine will be both the client and the server.

On my machine I chose to put my repository in my home directory. The full path is:

/usr/local/svn/repo

For the directory name you can use "repo", "repositories", or any other descriptive name.

To get started, access the Mac (UNIX) command line by opening the Terminal application. Choose Application > Utilities > Terminal from the Mac menu bar.

In the Terminal application (see Figure 1), you'll see a prompt which looks something like the following:

Voltage:~ voltmer$
The command line prompt in Terminal.
Figure 1. The command line prompt in Terminal.

In the prompt, Voltage is the name of my machine and voltmer is my login.

I use the following commands to:

  • Make a directory where I will keep Subversion repositories.
  • Create the repository using svnadmin.
  • Verify the repository was created by listing the directory contents (see Figure 2).
Voltage:~ voltmer$ sudo mkdir /usr/local/svn Voltage:~ voltmer$ sudo svnadmin create --fs-type fsfs /usr/local/svn/repo Voltage:~ voltmer$ ls /usr/local/svn/repo README.txt dav format locks Conf db hooks
Create the Subversion repository via the command line.
Figure 2. Create the Subversion repository via the command line.

Note: I precede each command with sudo to execute commands as the superuser. The first time you run the sudo command it will prompt you for the superuser password. It will cache the password for a while and not prompt you again until the cache times out.

That is it! I now have a repository where I can keep my code.

Configuring Apache

To access the repository via Apache, the Mac's built-in web server, I need to make a few changes to the Apache config file and to the repository's permissions.

At the prompt, I change to the configuration directory for Apache and back up my httpd.conf file, which is where the Apache configuration settings are kept:

Voltage:~ voltmer$ cd /etc/apache2/ Voltage:apache2 voltmer$ sudo cp httpd.conf httpd.conf.bak

Now I edit the file using the nano editor, which uses the Control key with letters to issue commands that are listed across the bottom of the screen. (You can use any text editor to edit the file.) Here is the command to start nano as superuser (see Figure 3):

Voltage:apache2 voltmer$ sudo nano httpd.conf
Edit the httpd.conf file as superuser.
Figure 3. Edit the httpd.conf file as superuser.

I must edit the file to load the WebDAV SVN module and configure the directory for the repository. Within the file there are several lines starting with LoadModule. At the end of that section I add the following on a line by itself (see Figure 4):

LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
Add a line to load the DAV SVN module.
Figure 4. Add a line to load the DAV SVN module.

Now I scroll down to the end of the file and add the following section (see Figure 5):

<Location /repo> DAV svn SVNPath /usr/local/svn/repo AuthType Basic AuthName "Subversion" AuthUserFile /usr/local/svn/svn_passwd Require valid-user </Location>
Add a section to configure the repository.
Figure 5. Add a section to configure the repository.

This tells Apache to map the /repo web directory to the actual file system location of the repository. This links the following URL:

http://localhost/repo

to the repository at /usr/local/svn/repo.

To save the file and exit nano I press Control (^X).

Because I don't want unauthorized users reviewing my repository I am going to create a password file to protect the contents. This file, /usr/local/svn/svn_passwd, was specified in the httpd.conf file but it does not yet exist. To create it, I change directory to the location where I am going to keep my repository and run the htpasswd utility to make the file (see Figure 6):

Voltage:apache2 voltmer$ cd /usr/local/svn Voltage:svn voltmer$ sudo htpasswd -c svn_passwd voltmer New password: Re-type new password: Adding password for user voltmer
Run htpasswd to add a password to the repository.
Figure 6. Run htpasswd to add a password to the repository.

It prompted me twice for the password for the user known as voltmer. It is not asking for my current user password but a new one for the web SVN access. You can, however, use the same password if you want. I also have to make sure that only the web server can read the repository, so I execute the following commands to set the permissions on the repository and password file (see Figure 7):

Voltage:svn voltmer$ cd /usr/local Voltage:local voltmer$ sudo chown –R www:www /usr/local/svn Voltage:local voltmer$ sudo chmod 600 /usr/local/svn/svn_passwd Voltage:local voltmer$ ls -la /usr/local/svn/svn_passwd -rw------- 1 _www _www 22 Sep 2 16:23 svn_passwd
Set permissions to restrict access to the repository and password file.
Figure 7. Set permissions to restrict access to the repository and password file.

The final task is to start (or restart) the web server. On a Mac, open System Preferences and then go to the Sharing control panel. If Web Sharing is not already checked (see Figure 8), then select it (see Figure 9).

If Web Sharing is not enabled, select it.
Figure 8. If Web Sharing is not enabled, select it.
Web Sharing is now selected and Apache is started.
Figure 9. Web Sharing is now selected and Apache is started.

If it is already checked (Apache is running), then deselect and reselect the Web Sharing option to stop Apache and restart it. To verify that everything is working correctly, point your web browser (for example, Safari) to http://localhost/repo. If all is working, you will be prompted for the username and password that you just created (see Figure 10), then you will see the root directory of the repository.

Enter your username and password to access the repository.
Figure 10. Enter your username and password to access the repository.

If you see the text "Powered by Subversion version..." (see Figure 11), then you know the setup is working.

"Powered by Subversion…" confirms that Apache is configured for SVN.
Figure 11. "Powered by Subversion…" confirms that Apache is configured for SVN.

Configuring Dreamweaver

With the new repository set up, you are now ready to configure Dreamweaver to use it. Follow the steps in the Configuring a new site to use the Subversion repository section to access the repository via the HTTP protocol.

This time when you click Test to verify your settings are correct, Dreamweaver will notify you that the project does not exist. This is because you have not yet submitted the files from the local file system to the repository. Click Done and another dialog box will ask you, whether you want to create the Subversion directory (see Figure 12). Click Yes.

When prompted, click Yes to create the Subversion directory.
Figure 12. When prompted, click Yes to create the Subversion directory.

At this point you will be able to see your files in the Local Files list. They now have a plus (+) symbol next to their names to indicate that the local files are different than those in the repository (see Figure 13).

The plus (+) symbol indicates that index.html is not synchronized with the repository.
Figure 13. The plus (+) symbol indicates that index.html is not synchronized with the repository.

This is true because there are no files in the repository yet; they need to be checked in for the first time. To check them in right-click on the top folder of the site and choose Check In (see Figure 14).

Choose Check In to perform the initial check-in.
Figure 14. Choose Check In to perform the initial check-in.

Just like the earlier example, Dreamweaver will prompt for a Commit Message. Type Initial check in and click Commit (see Figure 15).

Type a Commit Message and click Commit.
Figure 15. Type a Commit Message and click Commit.

Dreamweaver CS5 removes the plus (+) symbol in front of the files to indicate that they are checked in (committed) to the repository (see Figure 16). You are free to continue the check-out, edit, check-in cycle as needed. If other users will work on this project in the repository they can now configure their Dreamweaver CS5 sites in a similar manner.

The initial check-in is complete, and the files are committed to the repository.
Figure 16. The initial check-in is complete, and the files are committed to the repository.

Where to go from here

You can refer to a number of excellent resources available on the Internet for additional information. These include:

  • The Subversion site
  • The Subversion book

Other publications include:

  • Version Control with Subversion
  • Subversion Version Control
  • Practical Subversion

More Like This

  • Turning a design into HTML and CSS using the Fireworks to Dreamweaver workflow – Part 2: Modifying the HTML and CSS
  • Editing a WordPress theme with Dreamweaver CS5 – Part 3: Adding a logo, header styles, and menu
  • Working with Drupal in Dreamweaver CS5
  • Building a Drupal site in 10 steps
  • Turning a design into HTML and CSS using the Fireworks to Dreamweaver workflow – Part 1: Exporting the design
  • Editing a WordPress theme with Dreamweaver CS5 – Part 1: Learning the basics
  • Editing a WordPress theme with Dreamweaver CS5 – Part 2: Setting up your site
  • Editing a WordPress theme with Dreamweaver CS5 – Part 4: Building a custom home page
  • SQL primer for Dreamweaver users
  • Using Subversion with Dreamweaver CS5 – Part 1: Introducing Subversion

Tutorials and samples

Tutorials

  • Understanding HTML5 semantics: Changed and absent elements
  • Mobile app with PhoneGap: Submitting to the Apple App Store
  • PhoneGap and Dreamweaver: Releasing on iOS
  • Mobile app with PhoneGap: Submitting to Android Market

Samples

  • Responsive design with jQuery marquee
  • Customizable starter design for jQuery Mobile
  • Customizable starter design for HTML5 video
  • Customizable starter design for multiscreen development

Dreamweaver user forum

More
04/23/2012 Resolution/Compatibility/liquid layout
04/20/2012 using local/testing server with cs5 inserting images look fine in the split screen but do not show
04/18/2012 Ap Div help
04/23/2012 Updating

Dreamweaver Cookbook

More
11/07/2011 Simple social networking share buttons
09/20/2011 Registration form that will generate email for registrant to validate
08/21/2011 Spry Accordion - Vertical Text - Auto Start on Page Load - Mouse Over Pause
08/17/2011 Using cfdump anywhere you like

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement