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

i'm running an apache server at work that is accessed remotely through port 8010, which forwards to port 80 internally. i can access the virtual hosts locally with…

'http://virtualhost1', 'http://virtualhost2', etc

how do i access those hosts remotely? i would think it would be something like…

'http://work_ip:8010/virtualhost1', 'http://work_ip:8010/virtualhost2', etc

but of course that doesn't work

share|improve this question

1 Answer 1

If you're using non-public hostnames for your virtual hosts (as you appear to be from your example), then you need to get those names to resolve to the public IP on your external client in order for name-based virtual hosts to function as you're desiring. That'll probably mean the use of a hosts file, unless you have a DNS server in front of the client that you can add custom, non-public zones to.

A better approach would be to use proper, fully-qualified domain names in the public DNS hierarchy for a service that you're exposing over the public internet.

share|improve this answer

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.