~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
= Setting up launchpad local domains =

We run Launchpad on development machines using Apache and virtual hosts,
to simulate the production environment as far as possible, and allow
us to use virtual hosts on our local machine.

Here's how to set up your machine to do this.  You need to do these operations
as the root user.

== Modify your /etc/hosts ==

Add this line to /etc/hosts:
{{{
127.0.0.88	launchpad.dev code.launchpad.dev answers.launchpad.dev blueprints.launchpad.dev bugs.launchpad.dev translation.launchpad.dev xmlrpc.launchpad.dev shipit.ubuntu.dev shipit.kubuntu.dev shipit.edubuntu.dev
}}}

As we add more domains, you'll need to alter this line.

== Set up apache ==

If you have apache version 1 installed, remove it:

  sudo apt-get remove apache

Install apache2:

  sudo apt-get install apache2

Turn on proxying:

  sudo a2enmod proxy

Set up virtual hosting:

Create a file at /etc/apache2/sites-enabled/locallaunchpad

{{{
sudo vim /etc/apache2/sites-enabled/locallaunchpad
}}}

Put the following text in there.

{{{
<VirtualHost 127.0.0.88:80>
  ServerName launchpad.dev
  ServerAlias *.launchpad.dev
  LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
  <Proxy *>
    Order deny,allow
    Allow from 127.0.0.0/255.0.0.0
  </Proxy>
  ProxyPreserveHost on
  ProxyPass / http://localhost:8085/ retry=1
</VirtualHost>
}}}

Reload apache:

  sudo /etc/init.d/apache2 reload

== Use Launchpad ==

As your normal user, run launchpad.  You should be able to access it
at the following URLs:

  http://launchpad.dev/
  http://blueprints.launchpad.dev/