0

I am trying to create a hidden service in TOR this due to learning reasons.

It all seems to work fine when I want to use this normally with HTML.

But as soon as I want to install a dynamic web application such as the open source forum software PHPBB comes instead:

http://ONIONURL.onion/install/app.php

So with 8080 and it doesn't work like that:

http://ONIONURL.onion:8080/install/app.php

My Setup is:

  • phpBB 3.3.4
  • VPS Cloud Server with 8 GB Ram
  • PHP 7.3 (fpm) with extensions
  • MariaDB Newest Version
  • Chmod correctly

My Nginx conf:

server {
    listen 127.0.0.1:8080 default_server;
    server_name localhost;

    root /var/hiddenwww;
    index index.php index.html index.htm;
    server_tokens off;

    location / {
        allow 127.0.0.1;
        deny all;
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

I have already tried many variants in the config.

I'm really lost and maybe someone had the problem and can help me.

By the way, I was inspired by this tutorial.

1
  • You need to change the port in your torrc file, not your nginx config. Can you paste your torrc file into your question?
    – Steve
    Jul 8 at 21:38
0

Considering torrc default onion port is 80 and your nginx is configured to listen on port 8080, you should change the option HiddenServicePort to reflect that

HiddenServicePort VIRTPORT [TARGET]

Configure a virtual port VIRTPORT for a hidden service. You may use this option multiple times; each time applies to the service using the most recent HiddenServiceDir. By default, this option maps the virtual port to the same port on 127.0.0.1 over TCP. You may override the target port, address, or both by specifying a target of addr, port, addr:port, or unix:path. (You can specify an IPv6 target as [addr]:port. Unix paths may be quoted, and may use standard C escapes.) You may also have multiple lines with the same VIRTPORT: when a user connects to that VIRTPORT, one of the TARGETs from those lines will be chosen at random. Note that address-port pairs have to be comma-separated.

So in your case, you should write HiddenServicePort 80 127.0.0.1:8080 in your torrc config and you should be fine without changing your nginx config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.