Diff for "Running/RemoteAccess"

Not logged in - Log In / Register

Differences between revisions 9 and 10
Revision 9 as of 2009-10-22 20:46:18
Size: 3675
Editor: marienz
Comment: Mention local-launchpad is the file to edit and "#" comments in apache config files.
Revision 10 as of 2010-08-09 21:14:43
Size: 7086
Editor: brian-murray
Comment: Applying a patch seems easier to me
Deletions are marked like this. Additions are marked like this.
Line 29: Line 29:
=== Diff of local-launchpad for a single IP address ===

{{{
--- Documents/local-launchpad 2010-08-09 13:57:15.653110046 -0700
+++ /etc/apache2/sites-enabled/local-launchpad 2010-08-09 14:01:51.673118491 -0700
@@ -1,8 +1,6 @@
-NameVirtualHost 127.0.0.88:80
-
 RewriteLock /var/tmp/rewrite-lock
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName xmlrpc-private.launchpad.dev
   ServerName xmlrpc.launchpad.dev
   <Proxy *>
@@ -14,7 +12,7 @@ RewriteLock /var/tmp/rewrite-lock
   ProxyPass / http://localhost:8087/ retry=1
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName lists.launchpad.dev
   Alias / /var/tmp/mailman/mhonarc/
   <Directory /var/tmp/mailman/mhonarc>
@@ -23,7 +21,7 @@ RewriteLock /var/tmp/rewrite-lock
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.99:80>
+<VirtualHost *:80>
   ServerName bazaar.launchpad.dev
   LogLevel debug
 
@@ -54,35 +52,35 @@ RewriteLock /var/tmp/rewrite-lock
   </Location>
 </VirtualHost>
 
-<VirtualHost 127.0.0.99:443>
- ServerName bazaar.launchpad.dev
- LogLevel debug
-
- SSLEngine On
- SSLProxyEngine On
- SSLCertificateFile /etc/apache2/ssl/launchpad.crt
- SSLCertificateKeyFile /etc/apache2/ssl/launchpad.key
-
- ProxyRequests off
- <Proxy *>
- Order deny,allow
- Allow from localhost 127.0.0.0/255.0.0.0
- </Proxy>
- ProxyTimeout 20
-
- RewriteEngine On
-
- RequestHeader add X-Forwarded-Scheme https
-
- RewriteRule ^/$ http://launchpad.dev [L]
- RewriteRule ^/(.*)$ http://localhost:8080/$1 [L,P]
-
- <Location />
- ProxyPassReverse http://localhost:8080/
- </Location>
-</VirtualHost>
+#<VirtualHost 127.0.0.99:443>
+# ServerName bazaar.launchpad.dev
+# LogLevel debug
+#
+# SSLEngine On
+# SSLProxyEngine On
+# SSLCertificateFile /etc/apache2/ssl/launchpad.crt
+# SSLCertificateKeyFile /etc/apache2/ssl/launchpad.key
+#
+# ProxyRequests off
+# <Proxy *>
+# Order deny,allow
+# Allow from localhost 127.0.0.0/255.0.0.0
+# </Proxy>
+# ProxyTimeout 20
+#
+# RewriteEngine On
+#
+# RequestHeader add X-Forwarded-Scheme https
+#
+# RewriteRule ^/$ http://launchpad.dev [L]
+# RewriteRule ^/(.*)$ http://localhost:8080/$1 [L,P]
+#
+# <Location />
+# ProxyPassReverse http://localhost:8080/
+# </Location>
+#</VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName bazaar-internal.launchpad.dev
   LogLevel debug
 
@@ -97,7 +95,7 @@ RewriteLock /var/tmp/rewrite-lock
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName ppa.launchpad.dev
   ServerAlias private-ppa.launchpad.dev
   LogLevel debug
@@ -112,7 +110,7 @@ RewriteLock /var/tmp/rewrite-lock
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName archive.launchpad.dev
   LogLevel debug
 
@@ -125,7 +123,7 @@ RewriteLock /var/tmp/rewrite-lock
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:443>
+<VirtualHost _default_:443>
   ServerName launchpad.dev
   ServerAlias *.launchpad.dev
   ServerAlias shipit.edubuntu.dev
@@ -157,7 +155,7 @@ RewriteLock /var/tmp/rewrite-lock
 
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName launchpad.dev
   ServerAlias *.launchpad.dev
   ServerAlias shipit.edubuntu.dev
}}}

This page tells you how to modify a development Launchpad so you can access it from other machines. Ask for help right away if you run into problems.

These instructions assume that you already have Launchpad working for local access, and now you want it to be accessible from other machines on the same LAN.

IP Addresses

A full Launchpad development setup requires two IP addresses on the local machine, on which to run two HTTPS listeners - one for main Launchpad, and one for Loggerhead (code browsing) of private branches. As most developer workstations have only one non-local IP address, and as the second one is only required for Loggerhead on private branches, you may well not bother to set up an additional IP address. If you do want to do this, identify a suitable IP address, and add it to your machine's network configuration now.

Amending the Apache configuration

These instructions assume that you are using the Ubuntu packaged Apache 2.2 in Intrepid or later. Hardy users see the "Notes for Hardy" subsection. The file to edit is /etc/apache2/sites-available/local-launchpad unless mentioned otherwise.

  • Delete the NameVirtualHost 127.0.0.88:80 line

  • We are assuming that the line NameVirtualHost *:80 appears precisely once elsewhere in your Apache configuration - it should be present in /etc/apache2/ports.conf by default, check this is true

  • Change all <VirtualHost 127.0.0.88:80> lines to <VirtualHost *:80>

  • Change the <VirtualHost 127.0.0.88:443> line to <VirtualHost _default_:443>

  • If, as mentioned above, you are opting for the simple option of just using one IP address:
    • Change the <VirtualHost 127.0.0.99:80> line to <VirtualHost *:80> too

    • Comment out the entire <VirtualHost 127.0.0.99:443> block (prefix each line with a #)

  • Or, if you did allocate a suitable second IP address:
    • Change the <VirtualHost 127.0.0.99:80> line to <VirtualHost a.b.c.d:80>

    • Change the <VirtualHost 127.0.0.99:443> line to <VirtualHost a.b.c.d:443>

  • Change all the Allow from ... lines to admit whatever address range you want

Restart your Apache server.

Notes for Hardy

  • The NameVirtualHost *:80 line does not appear in /etc/apache2/ports.conf but instead NameVirtualHost * appears in /etc/apache2/sites-available/default. Delete it from there and add NameVirtualHost *:80 to ports.conf. As a consequence of doing so you'll probably have to update any other <VirtualHost *> sections in your config to say <VirtualHost *:80>.

Diff of local-launchpad for a single IP address

--- Documents/local-launchpad   2010-08-09 13:57:15.653110046 -0700
+++ /etc/apache2/sites-enabled/local-launchpad  2010-08-09 14:01:51.673118491 -0700
@@ -1,8 +1,6 @@
-NameVirtualHost 127.0.0.88:80
-
 RewriteLock /var/tmp/rewrite-lock
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName xmlrpc-private.launchpad.dev
   ServerName xmlrpc.launchpad.dev
   <Proxy *>
@@ -14,7 +12,7 @@ RewriteLock /var/tmp/rewrite-lock
   ProxyPass / http://localhost:8087/ retry=1
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName lists.launchpad.dev
   Alias  /   /var/tmp/mailman/mhonarc/
   <Directory /var/tmp/mailman/mhonarc>
@@ -23,7 +21,7 @@ RewriteLock /var/tmp/rewrite-lock
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.99:80>
+<VirtualHost *:80>
   ServerName bazaar.launchpad.dev
   LogLevel debug
 
@@ -54,35 +52,35 @@ RewriteLock /var/tmp/rewrite-lock
   </Location>
 </VirtualHost>
 
-<VirtualHost 127.0.0.99:443>
-  ServerName bazaar.launchpad.dev
-  LogLevel debug
-
-  SSLEngine On
-  SSLProxyEngine On
-  SSLCertificateFile /etc/apache2/ssl/launchpad.crt
-  SSLCertificateKeyFile /etc/apache2/ssl/launchpad.key
-
-  ProxyRequests off
-  <Proxy *>
-    Order deny,allow
-    Allow from localhost 127.0.0.0/255.0.0.0
-  </Proxy>
-  ProxyTimeout 20
-
-  RewriteEngine On
-
-  RequestHeader add X-Forwarded-Scheme https
-
-  RewriteRule ^/$ http://launchpad.dev [L]
-  RewriteRule ^/(.*)$ http://localhost:8080/$1 [L,P]
-
-  <Location />
-    ProxyPassReverse http://localhost:8080/
-  </Location>
-</VirtualHost>
+#<VirtualHost 127.0.0.99:443>
+#  ServerName bazaar.launchpad.dev
+#  LogLevel debug
+#
+#  SSLEngine On
+#  SSLProxyEngine On
+#  SSLCertificateFile /etc/apache2/ssl/launchpad.crt
+#  SSLCertificateKeyFile /etc/apache2/ssl/launchpad.key
+#
+#  ProxyRequests off
+#  <Proxy *>
+#    Order deny,allow
+#    Allow from localhost 127.0.0.0/255.0.0.0
+#  </Proxy>
+#  ProxyTimeout 20
+#
+#  RewriteEngine On
+#
+#  RequestHeader add X-Forwarded-Scheme https
+#
+#  RewriteRule ^/$ http://launchpad.dev [L]
+#  RewriteRule ^/(.*)$ http://localhost:8080/$1 [L,P]
+#
+#  <Location />
+#    ProxyPassReverse http://localhost:8080/
+#  </Location>
+#</VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName bazaar-internal.launchpad.dev
   LogLevel debug
 
@@ -97,7 +95,7 @@ RewriteLock /var/tmp/rewrite-lock
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName ppa.launchpad.dev
   ServerAlias private-ppa.launchpad.dev
   LogLevel debug
@@ -112,7 +110,7 @@ RewriteLock /var/tmp/rewrite-lock
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName archive.launchpad.dev
   LogLevel debug
 
@@ -125,7 +123,7 @@ RewriteLock /var/tmp/rewrite-lock
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:443>
+<VirtualHost _default_:443>
   ServerName launchpad.dev
   ServerAlias *.launchpad.dev
   ServerAlias shipit.edubuntu.dev
@@ -157,7 +155,7 @@ RewriteLock /var/tmp/rewrite-lock
 
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost *:80>
   ServerName launchpad.dev
   ServerAlias *.launchpad.dev
   ServerAlias shipit.edubuntu.dev

Amending the hosts file

When you ran rocketfuel-setup, your /etc/hosts file was configured with many launchpad.dev DNS names mapped onto a pair of local IP addresses. Change them both to the non-local IP address of the machine running the development Launchpad. Or, if you did allocate a second IP address, change 127.0.0.88 to the main IP address of the machine, and change 127.0.0.99 to the second IP address you allocated.

You'll need to copy these /etc/hosts lines into the /etc/hosts file of every other machine you want to access the development Launchpad instance.

If some of those other machines run Windows, it may be helpful to know that the Windows equivalent of /etc/hosts is located at C:\WINDOWS\system32\drivers\etc\hosts.

That's it!

If you did everything above, you should new be able to access https://launchpad.dev/ in a web browser on a suitably configured remote computer.

Running/RemoteAccess (last edited 2022-06-17 12:37:30 by cjwatson)