Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 752
  • Last Modified:

Apache hppd.conf - Virtual Host Question

How do I set up a VirtualHost to work on an internal network? I want to be able to type 'imageshare' into a browser on the network and have the site come up. As it is now, I have to type the IP address at which point the imageshare site comes up. This is because the ServerName is not recongnized so the IP address automatically will default to the first VirtualHost that it finds.

Eventually, I will have several sites on this one box. Any ideas?

Thanks in advance...

Dave


<VirtualHost *>
    ServerAdmin me@mysite.com
    DocumentRoot "D:/www/imageshare"
    ServerName imageshare
    ErrorLog logs/imageshare.com-error_log
    CustomLog logs/imageshare.com-access_log common
</VirtualHost>
0
Dongle_Dave
Asked:
Dongle_Dave
1 Solution
 
TranQuocVietCommented:
The are two way to setup your virtual host
1. Use IP and port. Ex
Listen 8080
<VirtualHost 192.168.200.63:8080>
   DocumentRoot "D:/www/imageshare"
   ServerName imageshare
</VirtualHost>
Your site can be accessed via http://192.168.20.63:8080

2. Use name resolution.
<VirtualHost yourpc>
   DocumentRoot "D:/www/imageshare"
   ServerName imageshare
</VirtualHost>

But the name must be resolvable. You can set this name in DNS or just specify it in the host file /winnt/system32/driver/ect/

With Apache, you can authorize many sites (via VirtualHost)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now