# How to fix WebTunnel bridge with Apache as reverse proxy

**URL:** https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475
**Category:** Relay Operator
**Created:** [September 5, 2024, 5:57pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475 "2024-09-05T17:57:41Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 5, 2024, 5:57pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/1 "2024-09-05T17:57:41Z")

</div>

I have these apache addons enabled, am I missing one? Ive enabled all the ones my server will handle but do I have the right proxy addon enabled or do I need to gofetch

excurso  
LoadModule proxy\_module modules/mod\_proxy.so  
LoadModule proxy\_ajp\_module modules/mod\_proxy\_ajp.so  
#LoadModule proxy\_balancer\_module modules/mod\_proxy\_balancer.so keep off  
LoadModule proxy\_connect\_module modules/mod\_proxy\_connect.so  
LoadModule proxy\_express\_module modules/mod\_proxy\_express.so  
LoadModule proxy\_fcgi\_module modules/mod\_proxy\_fcgi.so  
LoadModule proxy\_ftp\_module modules/mod\_proxy\_ftp.so  
#LoadModule proxy\_hcheck\_module modules/mod\_proxy\_hcheck.so keep off  
LoadModule proxy\_html\_module modules/mod\_proxy\_html.so  
LoadModule proxy\_http\_module modules/mod\_proxy\_http.so  
LoadModule proxy\_http2\_module modules/mod\_proxy\_http2.so  
LoadModule proxy\_scgi\_module modules/mod\_proxy\_scgi.so  
LoadModule proxy\_uwsgi\_module modules/mod\_proxy\_uwsgi.so  
LoadModule proxy\_wstunnel\_module modules/mod\_proxy\_wstunnel.so

Thank you

---

<div class="post-metadata">

### Author: ![anon68402605](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anon68402605](https://forum.torproject.org/u/anon68402605)
#### Post date: [September 7, 2024, 1:58pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/2 "2024-09-07T13:58:47Z")

</div>

For the WebTunnel bridge you need `mod_proxy.so` and `mod_ssl.so`.

Do you get an error?

You can run

```auto
apache2ctl configtest

```

to check whether the configuration is OK.

You ask how to fix, but do not describe what the problem is.

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 7, 2024, 3:19pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/3 "2024-09-07T15:19:33Z")

</div>

Thank you btw

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 7, 2024, 3:19pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/4 "2024-09-07T15:19:37Z")

</div>

It runs fine but WebTunnel is not liking it proctol error, I had some vhosts writing logs so I I’ve now commented out vhosts in httpd, I’m researching how to turn logs off full stop, got a couple of things to try from google. The only thing I can think the error is the logs. I’m on to it

---

<div class="post-metadata">

### Author: ![anon68402605](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anon68402605](https://forum.torproject.org/u/anon68402605)
#### Post date: [September 7, 2024, 4:30pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/5 "2024-09-07T16:30:49Z")

</div>

I assume you are not on Debian/Ubuntu.  
If so, the `apache2ctl` command might not be available unfortunately.

If you want to disable logging, try the following command:

```auto
grep -r -n 'CustomLog' /etc/httpd

```

where `/etc/httpd` is where your Apache’s configuration resides.

This will list you all the files containing “CustomLog”.  
To disable comment out the `CustomLog` lines.  
To disable error logs repeat the same with “ErrorLog”.  
Then reload/restart Apache.

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 7, 2024, 7:52pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/6 "2024-09-07T19:52:07Z")

</div>

Yes Windows of all! XAMP believe or not but it works very well everything I need thus far. Used it for years. Would mod\_security interfere? Off the cuff though if it doesn’t work after logs, but I really would try to keep that. Will disable the log for this too.

I’ll shall use the command httpd “your suggestion “ - output from command. I can go through by hand but I shall double check if I can use this command

Thanks for input

---

<div class="post-metadata">

### Author: ![anon68402605](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anon68402605](https://forum.torproject.org/u/anon68402605)
#### Post date: [September 7, 2024, 9:16pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/7 "2024-09-07T21:16:53Z")

</div>

Oh, Windows, OK.

For configuration purpose you should enable the error log temporarily for the WebTunnel virtual host:

Replace `ErrorLog Off` with `ErrorLog <Path-To-Log-File>`.  
Restart Apache and take a look into the log file.

If `mod_security` interferes, you will see it there.  
But it shouldn’t.

If you can’t solve it yourself, post the errors you get in the error log here.

Don’t forget to disable the error log again after you get the bridge to run properly.

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 8, 2024, 11:56am UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/8 "2024-09-08T11:56:42Z")

</div>

DataDirectory C:\WebTunnel  
GeoIPFile C:\WebTunnel\geoip  
GeoIPv6File C:\WebTunnel\geoip6  
Log notice file C:\WebTunnel\notices.log

BridgeRelay 1

ExtORPort auto  
ORPort 0.0.0.0:auto  
AssumeReachable 1  
SocksPort 0

ServerTransportPlugin webtunnel exec C:\WebTunnel\Pluggable\_Transports\webtunnel-client.exe

ServerTransportListenAddr webtunnel 127.0.0.1:15000  
ServerTransportOptions webtunnel url=https://\*  
MaxAdvertisedBandwidth 1 MBytes

ContactInfo \*  
Nickname \*

Does this all look good for torrc, I’ll be running it as a service using allwaysUp

I’'l report back Monaday Tuesday

---

<div class="post-metadata">

### Author: ![anon68402605](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anon68402605](https://forum.torproject.org/u/anon68402605)
#### Post date: [September 8, 2024, 2:14pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/9 "2024-09-08T14:14:39Z")

</div>

You need the webtunnel server executable here, not the client executable!:

```auto
ServerTransportPlugin webtunnel exec C:\WebTunnel\Pluggable_Transports\webtunnel-client.exe

```

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 9, 2024, 10:02am UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/10 "2024-09-09T10:02:45Z")

</div>

I’m having trouble finding the server version of WebTunnel, I’ve tried the usual expert packacke of tor and it’s not in there. In desperation I’ve dowloaded all the other windows packages and it’s not there.  
I’ve tried to compile from source using Go on Ubuntu as I have a Vm and there’s not a windows version there, seems to be focused on Debian but this is not really viable to keep a Vm running all the time. I’d rather the slimline route you could say.  
[Index of /torbrowser](https://dist.torproject.org/torbrowser/) is where I’ve tried  
Is there another repository I don’t know about or is there instruction to build a version for windows

Sorrry to be a bind but I think this will be the last hurdle with the apche mix

---

<div class="post-metadata">

### Author: ![anon68402605](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anon68402605](https://forum.torproject.org/u/anon68402605)
#### Post date: [September 9, 2024, 11:54am UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/11 "2024-09-09T11:54:54Z")

</div>

Have you tried to build using the native golang compiler for windows?

You can download it [here](https://go.dev/dl/).  
WebTunnel server source is [here](https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel/-/tree/main/main/server).

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 9, 2024, 1:06pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/12 "2024-09-09T13:06:24Z")

</div>

Thanks for reply,

Ive installed Go on windows used the download link and “go build main.go”  
C:\Program Files\Go\bin\webtunnel-main-main-server\main\server\>go build main.go  
main.go:18:2: no required module provides package [Sign in · GitLab](http://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib:) go.mod file not found in current directory or any parent directory; see ‘go help modules’  
main.go:16:2: no required module provides package [Sign in · GitLab](http://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel:) go.mod file not found in current directory or any parent directory; see ‘go help modules’  
main.go:6:2: no required module provides package [Sign in · GitLab](http://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel/common/syntheticIP:) go.mod file not found in current directory or any parent directory; see ‘go help modules’

Whats the problem or am i getting something wrong. Ive tried to dowload the modules manually and the links work fine in a browser, command line issue with gitlab?

Theres one called staticIP which is a locked page on gitlab

---

<div class="post-metadata">

### Author: ![anon68402605](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anon68402605](https://forum.torproject.org/u/anon68402605)
#### Post date: [September 9, 2024, 1:25pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/13 "2024-09-09T13:25:03Z")

</div>

Do the same as described [here](https://community.torproject.org/relay/setup/webtunnel/source/) in section 2 (Clone and compile).

You must clone the whole repository, then `cd` to the webtunnel server directory and start the build from there.

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 9, 2024, 3:44pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/14 "2024-09-09T15:44:17Z")

</div>

Ok built on windows. incidentally Window picked it up as a virus  
Added an exception  
I will now try the full effort and report back

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 9, 2024, 4:55pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/15 "2024-09-09T16:55:07Z")

</div>

Final result ok?

```auto
Sep 09 16:49:01.000 [notice] Your Tor server's identity key fingerprint is 'WebTunnelBR *'
Sep 09 16:49:01.000 [notice] Your Tor bridge's hashed identity key fingerprint is 'WebTunnelBR *'
Sep 09 16:49:01.000 [notice] Your Tor server's identity key ed25519 fingerprint is 'WebTunnelBR *'
Sep 09 16:49:01.000 [notice] You can check the status of your bridge relay at https://bridges.torproject.org/status?id=*
Sep 09 16:49:01.000 [notice] Bootstrapped 0% (starting): Starting
Sep 09 16:49:13.000 [notice] Starting with guard context "default"
Sep 09 16:49:13.000 [warn] Managed proxy "C:\WebTunnel\Pluggable_Transports\server.exe" wrote a STATUS line without TRANSPORT: "TYPE=version IMPLEMENTATION=\"webtunnel\" VERSION=\"0.0.1\""
Sep 09 16:49:13.000 [notice] Registered server transport 'webtunnel' at '*.*.*.*:443'
Sep 09 16:49:14.000 [notice] Bootstrapped 5% (conn): Connecting to a relay
Sep 09 16:49:14.000 [notice] Bootstrapped 10% (conn_done): Connected to a relay
Sep 09 16:49:14.000 [notice] Bootstrapped 14% (handshake): Handshaking with a relay
Sep 09 16:49:14.000 [notice] Bootstrapped 15% (handshake_done): Handshake with a relay done
Sep 09 16:49:14.000 [notice] Bootstrapped 20% (onehop_create): Establishing an encrypted directory connection
Sep 09 16:49:15.000 [notice] Bootstrapped 25% (requesting_status): Asking for networkstatus consensus
Sep 09 16:49:15.000 [notice] Bootstrapped 30% (loading_status): Loading networkstatus consensus
Sep 09 16:49:16.000 [notice] I learned some more directory information, but not enough to build a circuit: We have no recent usable consensus.
Sep 09 16:49:16.000 [notice] Bootstrapped 45% (requesting_descriptors): Asking for relay descriptors
Sep 09 16:49:16.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 6482/7787, and can only build 59% of likely paths. (We have 84% of guards bw, 82% of midpoint bw, and 85% of exit bw = 59% of path bw.)
Sep 09 16:49:16.000 [notice] Bootstrapped 73% (loading_descriptors): Loading relay descriptors
Sep 09 16:49:20.000 [notice] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits
Sep 09 16:49:21.000 [warn] Requested exit point '$BA44A*' is not known. Closing.
Sep 09 16:49:21.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
Sep 09 16:49:21.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
Sep 09 16:49:22.000 [notice] Bootstrapped 100% (done): Done
Sep 09 16:49:23.000 [notice] Self-testing indicates your ORPort *.*.*.*:62222 is reachable from the outside. Excellent. Publishing server descriptor.
Sep 09 16:49:31.000 [notice] Performing bandwidth self-test...done.

```

---

<div class="post-metadata">

### Author: ![anon68402605](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anon68402605](https://forum.torproject.org/u/anon68402605)
#### Post date: [September 10, 2024, 8:56am UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/16 "2024-09-10T08:56:07Z")

</div>

Looks good.

I forgot to mention `mod_proxy_http.so` . It is also required for the webtunnel bridge.  
But you already have it in your `LoadModule` list.

Now try to connect Tor Browser to your bridge.

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 10, 2024, 10:26am UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/17 "2024-09-10T10:26:24Z")

</div>

Theres no pt\_state or bridge\_line as of yet

 ![image](https://forum.torproject.org/uploads/default/original/2X/e/ee307639ab91e74b5c41e7b2fd9a94b685449b10.png)

It was funticional earler but now dysfunctional as I restarted to take a backup of the setup and keys

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 10, 2024, 10:27am UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/18 "2024-09-10T10:27:00Z")

</div>

```auto
Sep 10 05:22:35.000 [notice] Heartbeat: Tor's uptime is 6:00 hours, with 7 circuits open. I've sent 11.18 MB and received 20.27 MB. I've received 25 connections on IPv4 and 23 on IPv6. I've made 6 connections with IPv4 and 0 with IPv6.
Sep 10 05:22:35.000 [notice] While not bootstrapping, fetched this many bytes: 11776885 (server descriptor fetch); 479 (server descriptor upload); 335714 (consensus network-status fetch); 163095 (microdescriptor fetch)
Sep 10 05:22:35.000 [notice] Heartbeat: Since last heartbeat message, I have seen 13 unique clients.

```

---

<div class="post-metadata">

### Author: ![JingoJango](https://forum.torproject.org/user_avatar/forum.torproject.org/jingojango/32/6347_2.png) [@JingoJango](https://forum.torproject.org/u/JingoJango)
#### Post date: [September 10, 2024, 12:04pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/19 "2024-09-10T12:04:00Z")

</div>

ServerTransportOptions webtunnel url=https://

The url is the public facing true domain or the randoly generated text in the proxy script?

---

<div class="post-metadata">

### Author: ![anon68402605](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anon68402605](https://forum.torproject.org/u/anon68402605)
#### Post date: [September 10, 2024, 1:01pm UTC](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475/20 "2024-09-10T13:01:37Z")

</div>

```txt
webtunnel: dysfunctional

```

This is OK. It takes some time, then it will be shown as functional again.

> Theres no pt\_state or bridge\_line as of yet

The bridge line is:

```auto
webtunnel 1.2.3.4:1234 url=https://yourdomain/<SECRET_PATH>

```

The IP address/port combo is not used in webtunnel bridge. You can use any.

[Next page](https://forum.torproject.org/t/how-to-fix-webtunnel-bridge-with-apache-as-reverse-proxy/14475.md?page=2)
