<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>Hi Kevin,<br><br>I did set HiddenServicePort 80 localhost:8080 specifically for Mediawiki, running with apache2 webserver.<br><br>Although the service worked as expected on localhost, I was unable to send it over .onion. And setting HiddenServicePort 80 localhost:80 gave the standard apache2 configuration webpage, the module for which I have since disabled<br><br>I'll try the configuration you suggested early tomorrow and check the results.<br><br>Regards,<br>Farhān<br><br><div class="gmail_quote">On 4 August 2020 12:33:31 am IST, Kevin Kandlbinder <kevin@kevink.dev> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

    <p>Hello Farhān,</p>
    <p>You might not necessarily need a script for that, you can simply
      define multiple hidden services in your tor config.</p>
    <p>The only thing you need to do the following in your config (Note
      you can also open multiple ports):<br>
    </p>
    <pre><b>HiddenServiceDir</b> /path/to/dir/1
<b>HiddenServicePort</b> 80 8080

<b>HiddenServiceDir</b> /path/to/dir/2
<b>HiddenServicePort</b> 80 8081
<b>HiddenServicePort</b> 22 2222
</pre>
    <p>This will make your tor generate 2 hidden services, one with it's
      hostname found at <tt>/path/to/dir/1/hostname</tt> and one at <tt>/path/to/dir/2/hostname</tt>.
      In this example the first service would accept traffic on port 80
      and direct it to port 8080 of your host machine and the second
      would do the same but also forward port 22 to port 2222 of your
      host.<br>
    </p>
    <p>You may also want to put an nginx in front of your apps to act as
      a reverse proxy, so you can map different services to different
      directories, but there are a lot of tutorials for that out there,
      so I won't go into detail about that.<br>
    </p>
    Regards,<br>
    <div class="moz-signature"><b>Kevin Kandlbinder</b><br>
      <<i><a href="mailto:kevin@kevink.dev">kevin@kevink.dev</a></i>></div>
    <div class="moz-signature"><br>
    </div>
    <div class="moz-cite-prefix">Am 03.08.2020 um 19:13 schrieb Farhān:<br>
    </div>
    <blockquote type="cite" cite="mid:C00EEE0F-3AE1-41FB-B917-2CDDE275EFAF@gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Hi all,<br>
      <br>
      Are there any known scripts(.sh /.py etc) that could help me setup
      multiple .onion services on a single machine?<br>
      <br>
      Something like pagekite can potentially help, except of course for
      onion services.<br>
      <br>
      My aim is to setup a xmpp instance, a WriteFreely instance and a
      mediawiki site ultimately.<br>
      <br>
      Regards,<br>
      <br>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
tor-onions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:tor-onions@lists.torproject.org">tor-onions@lists.torproject.org</a>
<a class="moz-txt-link-freetext" href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-onions">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-onions</a>
</pre>
    </blockquote>
  

</blockquote></div><br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>