문제

I'm building a few SharePoint sites, and I want to make use of zones so I may set security different in the various zones. My workstation has a local SharePoint, and I use it for development. My workstation has a static IP, and is connected to the internet.

When I make a SharePoint site, I want to add a host header, for instance, devbox.com. I do not own this name, nor do I want to. I then add an entry in my hosts file, but when I surf to http://devbox.com:8080, it does not resolve. Do I need to register the name I want to use, or should this work, i.e., have my hosts file resolve names/IPs first?

도움이 되었습니까?

해결책

It should work. You will need to make sure your website has the right mappings, though. For example, if you want your site to respond to http://devbox.com:8080, you'll need to either set up your website to respond to all IP addresses and port 8080, or to respond to the devbox.com host header and port 8080.

BTW, to test whether your HOSTS file is set up correcly, open up a command line and PING devbox.com. You should see the address resolved to your local machine's IP address. If not, you've done something wrong in how you've set up your HOSTS file... please post the line in the HOSTS file that you're using.

BTW, per my comment below, you should probably use 127.0.0.1 (aka localhost) in your HOSTS file line, rather than your external IP. This will remove the IP address as a potential point of failure (e.g. in case a firewall blocks the traffic)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top