Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I setup a localhost portforwarding configuration in the coLinux .conf file, forwarding port 8090 to port 80 in the VM.

When http://localhost:8090 is entered in the browser, I get the correct response from nginx, but with Apache the response get the error /htdocs not found in the log.

However if I do a local port forwarding from 8090 to port 80 via SSH Apache responds fine.

Is there something about the way Apache handles the port redirection that causes it to fail?

PS, For those unfamiliar with coLinux it allows localhost connections to get to the VM by forwarding localhost ports on the Windows host to ports on the VM, as the 10.x.x.x IP it not accessible from the Windows host.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Are you using the same domain name for each request? Apache is probably configured to serve up the site based on the DNS name you use, as well as the port. So if you request http://localhost on one machine, and http://www.foo.com on another, you're going to get drastically different results.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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