Changes between Version 1 and Version 2 of faq/setup-development-workstation


Ignore:
Timestamp:
Feb 22, 2008, 12:29:19 PM (12 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • faq/setup-development-workstation

    v1 v2  
    88== Installing Debian ==
    99
     10== Installing and configuring critical helper packages ==
     11
     12Being able to send and receive email often part of the web application development process.
     13
     14{{{
     150 fidel:~# aptitude install mailx esmtp-run
     16}}}
     17
     18You will then want to edit the /etc/esmtprc file, modifying the following lines:
     19
     20{{{
     21# Config file for ESMTP sendmail
     22
     23# The SMTP host and service (port)
     24hostname=chavez.mayfirst.org:587
     25
     26# The user name
     27username=
     28
     29# The password
     30password=
     31
     32#qualifydomain=@mayfirst.org
     33#force sender=alfredo@mayfirst.org
     34#force reverse_path=alfredo@mayfirst.org
     35
     36# Whether to use Starttls
     37starttls=enabled
     38}}}
     39
     40FIXME: I can't properly send mail with this configuration, I get the following error:
     41
     42{{{
     43Invalid peer certificate (error 20)
     440 (null)
     45jamie@mayfirst.org: 0 (null)
     46Can't send mail: sendmail process failed with error code 70
     47}}}
     48
     49This could be related to a known [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=310968 bug in esmtp].
     50
    1051== Installing PHP, Apache, and MySQL ==
    1152
    12 == Configuring PHP, Apache, and MySQL ==
     53Install the required packages with:
     54
     55{{{
     56aptitude install mysql-server php5-cgi php5-cli libapache2-mod-suphp apache2-mpm-prefork php5-mysql
     57}}}
     58
     59== Configuring the environment ==
     60
     61The goal of the configuration is to make it as easy as possible to setup a new development environment for a new project.
     62
     63Each new project will have a unique, non-public domain name based on the name of the workstation. In this example, let's assume the workstation is named "fidel." So - a new project called mfpl would have the development domain name: mfpl.fidel (below we will edit the /etc/hosts file so that this non-public domain name will resolve to the development workstation).
     64
     65Apache can be configured so that it dynamically sets the document root based on the domain name.
     66
     67To enable that feature, create a new file called virtual-document-roots in the /etc/apache2/sites-available directory with the following contents (replace your-username with your actual username).
     68
     69{{{
     70VirtualScriptAlias /home/your-username/projects/%1/cgi-bin/
     71VirtualDocumentRoot /home/your-username/projects/%1/web/
     72}}}
     73
     74Next enable the vhost_alias module and the site configuration file you just created with:
     75
     76{{{
     77a2enmod vhost_alias
     78a2ensite virtual-document-roots
     79}}}
     80
    1381
    1482== Steps to create a new project ==