3675
Comment: Mention local-launchpad is the file to edit and "#" comments in apache config files.
|
2348
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
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. | = Accessing launchpad.dev from anywhere on the LAN = |
Line 6: | Line 6: |
== 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. |
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, or perhaps the virtual machine or LXC host. |
Line 10: | Line 9: |
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>`. |
Launchpad's default development Apache config (`/etc/apache2/sites-available/local-launchpad`) only listens on 127.0.0.88. This can be overriden with the LISTEN_ADDRESS environment variable when running `make install`. You probably want to make it listen on everything: {{{ sudo make LISTEN_ADDRESS=* install }}} `zsh` users receiving the error `no matches found: LISTEN_ADDRESS=*` may need to `noglob` this: {{{ noblog sudo make LISTEN_ADDRESS=* install }}} |
Line 30: | Line 19: |
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. | Launchpad makes extensive use of virtual hosts, so you'll need to add entries to `/etc/hosts` on any machine from which you want to access the Launchpad instance. You'll see the relevant hostnames in `/etc/hosts` on the machine running the instance -- they need to be added to the remote machine, mapped to the server machine or container's external IP address. |
Line 32: | Line 21: |
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`. |
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`. Note that Windows' version has a line length limit, so you might have to split it across multiple lines or only include the hostnames that you need. |
Line 38: | Line 25: |
= Accessing launchpad.dev from a single host over SSH = SSH provides a SOCKS proxy. By running that proxy on the target machine, you can view its Launchpad web site as if you were on that machine, without having to open non-SSH ports to a wider network. To do so: ssh -D8110 target-machine Then set your browser's SOCKS proxy settings to use target-machine:8110 |
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. |
Accessing launchpad.dev from anywhere on the LAN
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, or perhaps the virtual machine or LXC host.
Amending the Apache configuration
Launchpad's default development Apache config (/etc/apache2/sites-available/local-launchpad) only listens on 127.0.0.88. This can be overriden with the LISTEN_ADDRESS environment variable when running make install. You probably want to make it listen on everything:
sudo make LISTEN_ADDRESS=* install
zsh users receiving the error no matches found: LISTEN_ADDRESS=* may need to noglob this:
noblog sudo make LISTEN_ADDRESS=* install
Amending the hosts file
Launchpad makes extensive use of virtual hosts, so you'll need to add entries to /etc/hosts on any machine from which you want to access the Launchpad instance. You'll see the relevant hostnames in /etc/hosts on the machine running the instance -- they need to be added to the remote machine, mapped to the server machine or container's external IP address.
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. Note that Windows' version has a line length limit, so you might have to split it across multiple lines or only include the hostnames that you need.
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.
Accessing launchpad.dev from a single host over SSH
SSH provides a SOCKS proxy. By running that proxy on the target machine, you can view its Launchpad web site as if you were on that machine, without having to open non-SSH ports to a wider network. To do so:
- ssh -D8110 target-machine
Then set your browser's SOCKS proxy settings to use target-machine:8110