misterperl has asked for the wisdom of the Perl Monks concerning the following question:

I installed and started podwebserver as root. Oddly, the install did not put the executable into /usr/bin even though the install said OK. locate didn't find it anywhere!

So I copied that from another node, placed it into /usr/bin, and chmod-ed it. Now it runs. It indexes modules, then tells me I can access the pod using localhost:8020 . Ducky!

But that host is in another state- its NOT my localhost. So I figure no problem, I'll just use:
But that times out.. Is this ONLY viewable as localhost?


Replies are listed 'Best First'.
Re: how can I access podwebserver remotely?
by Corion (Pope) on Oct 28, 2020 at 16:53 UTC

    As long as the webserver only listens on localhost, it will only be reachable via localhost. If you want it to be publically accessible, you will need to make it listen on

    podwebserver -p 1234 -H

    (this is straight from Pod::Webserver. If you are using a different program, consider telling us, which program you use)

Re: how can I access podwebserver remotely?
by Fletch (Chancellor) on Oct 28, 2020 at 18:35 UTC

    If you're ssh'ing into the box you can port forward something on your box across the connection and then connect to the forwarded port on your localhost; e.g. ssh -L 8020:localhost:8020 and then when you hit http://localhost:8020 on your box ssh magic will happen. This of course presumes that your server is configured to allow port forwarding.

    This also has the advantage of not having whatever you're running listening on an outside port (it's still just listening on localhost) so you don't need to be as wary that you're opening whatever up to the vagaries of the wild intertubes.

    Edit: WRT the install location, check what perl -V:prefix says; things may have installed into a bin directory under that instead of where you think it was going to install. You can check what's there with something like ls $( perl -MConfig -lE 'say qq{$Config{prefix}/bin}' ) presuming a *NIX environment.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: how can I access podwebserver remotely?
by hippo (Chancellor) on Oct 28, 2020 at 16:14 UTC

    To view it remotely you will almost certainly have to modify the firewall on the server host. Talk to the sysadm of the server host about that. TCP/8020 is not likely to be open by default.