Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

how can I access podwebserver remotely?

by misterperl (Pilgrim)
on Oct 28, 2020 at 15:41 UTC ( [id://11123266]=perlquestion: print w/replies, xml ) Need Help??

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:

http://www.myserver.com:8020
But that times out.. Is this ONLY viewable as localhost?

TYVM

Replies are listed 'Best First'.
Re: how can I access podwebserver remotely?
by Corion (Patriarch) 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 www.myserver.com:

    podwebserver -p 1234 -H www.myserver.com

    (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 (Bishop) 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 myserver.com 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 (Bishop) 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.


    🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11123266]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-26 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found