Can I run/access localhost server thru ip and subnet?
Is it possible for me to run a webserver on my computer (shared ip) and access it remotely using my ip + subnet or at least some way that doesn't involve having the IT guys make changes to the machine(s) currently running our virtual servers and/or routing our subnet?
Rationale: I'm on a computer at work, and I'm making changes to a plugin for Google Website Optimizer. I want GWO to be able to access localhost (i.e. my development environment) so that I don't have to deploy every change to the production server while I'm feeling out the system. (lots of changes; tedious deployment takes up most of the time)
I can't just supply my IP to GWO because that points to our production server (all of our computers at work are on the same IP). If I could construct a URI that points just to my computer, then I suppose I could let GWO view a page on my development environment and interact therewith.
Not only would achieving this purpose be helpful in present circumstances, but it would aid me immensely in that I could let my boss look at what I've got in dev, from his own machine, at his leisure, without deploying changes t开发者_高级运维o production.
I'm not familiar with the Google Website Optimizer, or how/where a plugin for it that you might write would be executed. So I'm going to summarize what I understand about your problem (including some guesses) and go from there, please correct me if I'm wrong.
- Your company has one public IP address.
- Your workstation and all the hosts on your network are source NAT'ed to the internet.
- Port 80 (http) on your public IP address is destination NAT'ed to your production webserver which is hosted as a virtual machine.
- You have a development webserver that is hosted on your workstation.
- You have reservations about involving your "IT guys" to making routing or system admin changes.
- You want your development environment to be accessible from the internet.
First up (assuming everything above is correct):
access it remotely using my ip + subnet
- No. Not possible.
Second up:
I could let my boss look at what I've got in dev
- Easy, get him to point his browser at your workstation's IP address on your internal network.
Possible solutions for remotely accessible:
- Talk to your "IT guys" about getting your dev environment made externally accessible.
- Use name-based virtual hosts on your production webserver. Requires setting up a DNS record for the dev site (e.g.
dev.your-company
) and pointing it to your company's IP address. If SSL is in use this is harder to achieve. You could then:- Proxy requests for a different site name to your workstation (readily achievable with apache).. or
- Host your development environment on your production server
- Proxy a particular URL path to your workstation. (e.g.
/dev/
) - Get an unused port (e.g. 8080) on your public IP destination NAT'ed to port 80 on your workstation. Your dev environment URL might then be
http://www.your-company:8080/
精彩评论