This page will learn you how to use multiple Jetty instances, in order to run multiples eepsites onto a same I2P node.
How to #1 (2010)[Bearbeiten]
Wrote by Zzz (ref):
- Set up a second server tunnel in i2ptunnel
- Copy ~/.i2p/eepsite/jetty.xml, and edit it to change the port number and ALL the places there is a path specified (docroot, cgi-bin, logs, ... directories). Change the port too ! The port must of course match the port in your new server tunnel.
- Copy ~/.i2p/contexts/* and change the paths in there also
- Don't copy eepPriv.dat ! You want new keys for your new eepsite.
- You also need the cgi-bin, etc, logs, and web apps directories set up. it may be easier to copy the whole ~/.i2p/eepsite directory and just remove eepPriv.dat.
- Add a client app in clients.config, or on /configclients in the router console, with arguments similar to your first eepsite, but pointing to the new jetty.xml.
How to #2 (2005-2008)[Bearbeiten]
The following instructions are very old, checks and updates are welcome.
1. Make a new directory "eepsite2" under your i2p install directory containing the same files and layout as in the "eepsite/" directory. 2. Edit eepsite2/jetty.xml, changing the port numbers and paths as necessary:
* On Linux: sed 's/eepsite/eepsite2/' (or something like this; this would establish the new eepsite on port 7659.) * On ["Windows"]: With !WordPad (or your favourite text editor), Edit -> Replace, "eepsite" to "eepsite2" and "7658" to 7659 (or whatever port you want).
3. Edit clients.config, creating a new set of clientApp.#.* lines, for example:
clientApp.4.main=org.mortbay.jetty.Server clientApp.4.name=eepsite2 clientApp.4.args=eepsite2/jetty.xml clientApp.4.delay=30
NB! In case you have modified clients.config before, make sure the numbers after `clientApp` are contiguous - there should be no duplicate entries and no holes either. Ignore lines that begin with the hash mark (`#`)
4. Restart your router 5. Go to I2PTunnel. At the bottom of the page, choose "HTTP server tunnel" and click 'Create'. 6. Fill the form with appropriate values. Here's a quick guide:
* Name - The name by which you can identify the tunnel on the I2PTunnel Webmanager. For example, enter 'eepsite2' * Description - Also only visible on the I2PTunnel Webmanager. * Target - Enter 127.0.0.1 as Host and whatever port you specified as Port (7659 by this example) * Website name - The address of your new eepsite, for example `yourname.i2p` * Private key file - The filename for your private destination key, for example `eepsite2/PrivKey.dat`. Note that if you change this later, the file will not be automatically generated. You have to specify the correct name the first time, or generate a new key manually:
java -jar lib/i2ptunnel.jar -nogui -e "genkeys eepsite2/PrivKey.dat eepsite2/PubKey.dat"
* Local destination - Your base64 destination key will appear here once you've created and started the tunnel. You can copy
7. That's it. Click 'Save changes' and you're done. Enjoy!
- Further details on the `jetty.xml` configuration file can be found at http://jetty.mortbay.com/