Eric Donaldson
asked on
Script
Hi,
I need a script to bring up a website to test on port 80 to my local pc, website is on a server remote. I would need to use port forwarding for this, is there an easy way to do this? My local computer is redhat and remote is redhat. I need to be able to test on my local web browser.
I need a script to bring up a website to test on port 80 to my local pc, website is on a server remote. I would need to use port forwarding for this, is there an easy way to do this? My local computer is redhat and remote is redhat. I need to be able to test on my local web browser.
That doesn't make any sense. Why aren't you going directly to the website in your browser?
ASKER
Because this is a test server and the server is CLI only. There is no dns yet
If it is CLI only, then the only browser that might be available to you is Lynx which is a text browser, no images.
Do you have SSH access to the remote system?
If so you can use an SSH connection to forward an local port to a remote systems port.
ssh -L 8888:remoteserver.com:80 user@remoteserver.com
Then you can point your browser at localhost:8888 and connect to the remote systems apache/web server.
If so you can use an SSH connection to forward an local port to a remote systems port.
ssh -L 8888:remoteserver.com:80 user@remoteserver.com
Then you can point your browser at localhost:8888 and connect to the remote systems apache/web server.
ASKER
So I connect with my SSH client in this format: ssh -L 8888:remoteserver.com:80 user@remoteserver.com
Then open browser with this: localhost:80? I notice you have 8888
Then open browser with this: localhost:80? I notice you have 8888
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, so would it be possible to also use local dns using domain name too? Right now I cannot edit the host file on the pc though.
Correct, you would be able to use DNS from the client computer. If DNS has been configured for that domain name.
ASKER
This fixed my issue
ASKER
This fixed the issue
ASKER
"
Please assign points and close the question if you are happy with the answer.