Questions tagged [virtual-hosts]

Virtual hosts or virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers).

Virtual hosts or virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers).

This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same host name. The term virtual hosting is usually used in reference to web servers but the principles carry over to other internet services.

One widely used application is shared web hosting.

There are two main types of virtual hosting, name based and IP based. Name based and IP based virtual hosting can be combined, a server may have multiple IP address and serve multiple names on some or all of those IP addresses. This technique can be useful when using SSL/TLS with wildcard certificates.

241 questions
7
votes
4 answers

Virtual Hosts - all redirect to the WAMP localhost 'home' page

I've setup the latest version of WAMP on my Windows 8 PC - I cannot seem to get multiple virtual hosts to work, every local URL I load will show the WAMP homepage. Can anyone explain what I am doing wrong? // My hosts file 127.0.0.1 localhost …
Zabs
  • 13,852
  • 45
  • 173
  • 297
7
votes
2 answers

Run my php files from outside htdocs

I have my xampp installed and running sites from the htdocs folder. I want to create a website directory in a different location and run the files online from there. I know I can do this somehow using both Virtual Host settings and changing my…
Pierce McGeough
  • 3,016
  • 8
  • 43
  • 65
6
votes
1 answer

Need help setting up: Apache Reverse Proxy

I have some trouble setting my virtualhosts file up the right way. I'd like to send vistors to the right server by using reverse proxy. My current setup gives me an internal error. i have only 1 public ip and want to proxy the visitor on the…
TheWolfNL
  • 1,263
  • 1
  • 13
  • 29
6
votes
5 answers

Removing Tomcat context from URLs for a virtual host (mod_jk, mod_rewrite)

I have a single Tomcat instance containing a number of webapps, each accessible via it's /Context. Tomcat is behind httpd (actually Debian Apache2), configured with virtual hosts to serve each app/Context. Tomcat connectivity is with mod_jk. This…
Richard H
  • 38,037
  • 37
  • 111
  • 138
6
votes
2 answers

What is the best way to install Mod_jk on linux to run apache in front of tomcat

I am using Wordpress for my blog and my main project is in java using tomcat server so I want each request coming to my server to go through apache. For exemple if my site uses www.sample.com I would like to send the request to tomcat and if it is…
Ram Balwad
  • 269
  • 1
  • 4
  • 11
5
votes
1 answer

Can jboss-web.xml have access to properties?

I am trying to setup my project to use different virtual-host names depending on the environment. I know I could create directories with a separate jboss-web.xml file in each directory. But I recently moved this project to maven and wanted to take…
Eric
  • 1,023
  • 1
  • 15
  • 27
5
votes
2 answers

Shell script to append new lines to etc/hosts and Apache httpd-vhosts.conf in Mac OSX 10.6

I am using Mac OSX 10.6 and doing web development on it. I know a small amount about writing shell scripts, but I am not really versed in them as of yet. What I would like to do is to write a shell script that will simply ask for a local site alias…
Patrick
  • 3,302
  • 4
  • 28
  • 47
5
votes
1 answer

vagrant /etc/hosts: machine IP vs localhost

I have a vagrant machine setup with this IP address: Vagrant.configure("2") do |config| config.vm.network :private_network, ip: 192.168.33.11 config.vm.network "forwarded_port", guest: 80, host: 8080 config.vm.hostname =…
numediaweb
  • 16,362
  • 12
  • 74
  • 110
5
votes
1 answer

Wamp Virtual Host Set Up

sorry for having a similar question to what has been posted all ready but the others aren't helping me. I'm trying to set up a virtual host on my windows 8 computer but I can't seem to get it to work no matter what tutorial or help section i…
ChrisBull
  • 467
  • 6
  • 21
5
votes
3 answers

dns lookup not working while offline

i have setup my acrylic dns proxy to include some addresses to redirect to localhost- therefore i am able to redirect specific domain names to my local machine, without any need to look anything up on the internet (i don't have internet connection…
user151496
  • 1,849
  • 24
  • 38
4
votes
3 answers

How do fix apache error "not within configured docroot" under Ubuntu

Greetings experts and gurus, I am looking for some help with an apache php configuration problem. I have been running several websites from an apache2 setup on an ubuntu server for some time now without problems using the line NameVirtualHost * in…
Finglish
  • 9,692
  • 14
  • 70
  • 114
4
votes
2 answers

Virtual Host from Apache is different domain/directory but only use first

I've configured two virtual host cuckoo.net and fb.core.net are located to local ip address (127.0.0.1) But when I access the second domain: fb.core.net, it always returns the first. Please consider the below configuration to help me, I really don't…
vietean
  • 2,975
  • 9
  • 40
  • 65
4
votes
2 answers

How set TimeZone for each virtual host in tomcat

I have web apps for 3 regions(Mongolia,Turkmenia, etc). And they are deployed on tomcat's virtual host. Now I need set timezone for each application. How can I do that? I implemented ServerContextListener interface for each apps to set…
4
votes
1 answer

How can I set up a load balancer for multiple virtual hosts (apache)

I am trying to set up a load balancer for a couple of virtual hosts on my apache server. These virtual hosts are added by adding the following lines for the file "C:\Windows\System32\drivers\etc\hosts": 127.0.0.1 localhost 127.0.0.1 …
Langkiller
  • 3,377
  • 13
  • 43
  • 72
4
votes
4 answers

VirtualHosts does not work on Mac OS 10.7

I want to create VirtualHosts on Mac OS 10.7 and therefore I edited the /etc/apache2/httpd.conf. I uncommented the line "Include /private/etc/apache2/extra/httpd-vhosts.conf" to include the virtual hosts. In the file…
tester
  • 3,977
  • 5
  • 39
  • 59
1
2
3
16 17