Questions tagged [virtualhost]

Questions relating to virtual hosting; that is, serving content for multiple logically-separate entities from the same machine. Usually relates to name-based virtual hosting in the web server, but can also cover other protocols such as SMTP or IMAP.

HTTP Virtual Hosting

In HTTP, virtual hosting refers to the serving of content for multiple domains from a single server. The most common form of virtual hosting is properly called "name-based virtual hosting", where the content to be shown is based on the domain name being requested. Less frequently, virtual hosting can be done by using the destination IP address to select which content to show (this is most commonly used when hosting HTTPS websites).

Guides for configuring virtual hosting in a number of common web servers include:

Mail Virtual Hosting

Mail service can also benefit from a form of virtual hosting. In this instance, the receiving SMTP server performs local delivery based on the entireity of the e-mail address (rather than just the local-part), and users login to their POP3/IMAP server using a username that includes their domain (this is usuallythe user's e-mail address) rather than a bare username, and the server looks up the login details and configuration information for the user based on that fully-qualified name. This allows multiple users with the same local-part to use the same server.

Most "integrated" mail services support this feature "by default"; that is, users always use their full e-mail address to login. However, most standalone mail servers do not support this by default and require additional configuration.

Further Reading

2749 questions
10
votes
3 answers

How to disable https access to specific virtual hosts?

Alright, so I have an Apache server set up with the following directives: NameVirtualHost *:80 ServerName example1.com ServerAlias www.example1.com DocumentRoot /var/www/html ServerName…
nearengine
  • 103
  • 1
  • 1
  • 4
10
votes
1 answer

Puppet: managing (lots of) Apache VirtualHosts

I'm learning my way through configuration management in general and using puppet to implement it in particular. I have already done some generic research (also on SF) and right now I'm considering Apache VirtualHosts. We host a lot of LAMP websites…
Luke404
  • 5,826
  • 4
  • 47
  • 58
10
votes
1 answer

How do you set server specific ENV values in Nginx?

I am starting a project that uses environment variables to set the database connection and a couple other things. (They didn't want to use configuration files since people are careless and overwrite them). Anyway, I am using nginx and while it…
Xeoncross
  • 4,449
  • 12
  • 43
  • 56
10
votes
5 answers

Apache isn't respecting the ServerName directive for a particular site

I've got a few sites configured as VirtualHosts using Apache that have been working fine for a while. I recently changed the hostname of the server to one of the domain names that was being served, and also added it to /etc/hosts pointing to the…
John Debs
  • 287
  • 1
  • 4
  • 10
10
votes
2 answers

SSL site not using the correct IP in Apache and Ubuntu

I'm trying to set up an apache-ubuntu-php webserver. My webserver will host multiple SSL sites, each SSL site will have it's own IP address (unless there's a better way to do this). So I suppose the first step is to get apache to recognize at least…
John
  • 7,343
  • 23
  • 63
  • 87
9
votes
2 answers

ESXi 6.5 server (no vSphere) sched.mem.min error related to PCI passthrough

I have an ESXi 6.5 server without vSphere I've been running for a couple years. I have a VM with PCI passthrough of a cougar point SATA controller from the SM X9SCL-F-O motherboard. I wanted to move the CP controller to another VM, but no matter…
9
votes
2 answers

virsh command that displays the cpu and memory consumption?

I want to know if there is a command virsh to display the cpu and memory consumption of each machine virtual. I created the virtual machine using KVM in ubuntu system.
9
votes
8 answers

Multi-site hosting - important vulnerability being missed to secure sites from each other?

EDIT #2 July 23, 2015: Looking for a new answer that identifies an important security item missed in the below setup or can give reason to believe everything's covered. EDIT #3 July 29, 2015: I'm especially looking for a possible misconfiguration…
sa289
  • 1,318
  • 2
  • 18
  • 44
9
votes
1 answer

SSL setup with apache in front of tomcat

i m trying to setup Apache with SSl and proxy SSL requests to my tomcat instance. I think i made the SSL work but theres still a error that shows up: Bad Gateway The proxy server received an invalid response from an upstream server. * SSL…
SaifDeen
  • 193
  • 1
  • 1
  • 5
9
votes
1 answer

What is the difference between *:80 and _default_:80 in Apache2?

I'm trying to understand the difference between the following two terms: *:80 _default_:80 in the Apache configuration file. The documentation here is unclear to me, and the only mailing list conversation that I could find here does not shed any…
Johannes Ernst
  • 1,097
  • 5
  • 17
  • 27
9
votes
1 answer

Apache: Using same Directory directive for multiple virtual hosts

Here's a sample VirtualHost entry ServerName domain.com ErrorLog logs/domain.com-error_log CustomLog logs/domain.com-access_log common DocumentRoot "/var/www/srs/web" DirectoryIndex index.php Alias /sf…
Peter Bailey
  • 193
  • 1
  • 1
  • 4
9
votes
3 answers

domain redirection with virtualhost

I have setup a domain, I and I would like to point that domain onto a different webserver. lets say: domain 1: www.test.com on server 1 domain 2: www.test1.com on server 2 I would like to forward www.test1.com to www.test.com, and I have tried to do…
mahatmanich
  • 2,954
  • 3
  • 22
  • 23
9
votes
1 answer

Directory inside or outside VirtualHosts?

Is there a difference between putting Directory tags inside or outside VirtualHosts? I found a configuration file that has several VirtualHosts all with the same Directory tag inside, and the same outside; so I'm thinking of getting rid of this…
Pablo Fernandez
  • 7,438
  • 25
  • 71
  • 83
9
votes
3 answers

How can I use DocumentRoot and server-status within an Apache virtual host?

I have this virtual host setup as the first in a list of virtual hosts. It is ServerName localhost DocumentRoot "/www/drupal5" SetHandler server-status Order Deny,Allow Allow from…
user58003
8
votes
2 answers

Redirecting of hostname to full qualified domain name with HTTPS fails

First off, I don't want to use rewrites. I'm trying to redirect any call (HTTP or HTTPS) to myserver to the secured fully qualified domain using https at https://myserver.fullyqualified.com. Here is my config # Redirect all http traffic to…
secondbreakfast
  • 183
  • 1
  • 5