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
110
votes
5 answers

Multiple SSL domains on the same IP address and same port?

This is a Canonical Question about Hosting multiple SSL websites on the same IP. I was under the impression that each SSL Certificate required it's own unique IP Address/Port combination. But the answer to a previous question I posted is at odds…
John
  • 7,343
  • 23
  • 63
  • 87
103
votes
2 answers

What is .crt and .key files and how to generate them?

I've the following configuration: SSLEngine on SSLCertificateFile /etc/httpd/conf/login.domain.com.crt SSLCertificateKeyFile /etc/httpd/conf/login.domain.com.key SSLCipherSuite ALL:-ADH:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP but I don't know how to…
Mohammad Ali Akbari
  • 1,763
  • 5
  • 20
  • 24
72
votes
10 answers

Apache Default/Catch-All Virtual Host?

If I have 3 domains, domain1.com, domain2.com, and domain3.com, is it possible to set up a default virtual host to domains not listed? For example, if I would have: DocumentRoot /www/docs/domain1 ServerName…
SJaguar13
  • 937
  • 1
  • 6
  • 13
71
votes
4 answers

Redirect URL within Apache VirtualHost?

I have a dedicated server with Apache, on which I've set up some VirtualHosts. I've set up one to handle the www domain as well as the non-www domain. My VH .conf file for the www: DocumentRoot /var/www/site ServerName…
DisgruntledGoat
  • 2,629
  • 4
  • 28
  • 36
53
votes
2 answers

difference between _default_:* and *:* in VirtualHost Context

I want to know the difference between "default:*" and "*:*" in VirtualHost Context. #... ServerName host.example.com #... #... ServerName host.example.com …
Luigi Giuseppe
  • 631
  • 1
  • 6
  • 4
48
votes
5 answers

How can I tell which config file Apache is using?

I'm trying to set up virtual hosts on Mac OS X. I've been modifying httpd.conf and restarting the server, but haven't had any luck in getting it to work. Furthermore, I notice that it's not serving files in the DocumentRoot mentioned in httpd.conf…
Claudiu
  • 1,207
  • 5
  • 21
  • 28
47
votes
6 answers

Apache "Client denied by server configuration", despite allowing access to directory (vhost configuration)

in Apache on Ubuntu I've set up a vhost, but in the browser I keep getting a "403 Access forbidden" error; the log says "Client denied by server configuration: /home/remix/". Looking for the solution online I found many posts about the directory…
GroovyPanda
  • 573
  • 1
  • 4
  • 6
46
votes
2 answers

Serve http (port 80) and https (port 443) on same VirtualHost

I need to setup my VirtualHost on Apache to serve on both http and https (using standard ports) If I enable the SSL Engine (as per below) - I get an error when on port 80. The reason is, parts of the site need to be SSL but other parts don't. How…
kron
  • 735
  • 2
  • 6
  • 8
45
votes
1 answer

nginx name-based virtual hosts on IPv6

I have an nginx server serving up nearly half a dozen different websites. It's running on a Linode that just got IPv6 native support (Dallas data center), and I'm trying to configure most of my sites for dual-stack operation. I got the first one up…
Kromey
  • 3,641
  • 4
  • 25
  • 30
43
votes
1 answer

Declaring multiple ports for the same VirtualHosts

Declare multiple ports for the same VirtualHosts: SSLStrictSNIVHostCheck off # Apache setup which will listen for and accept SSL connections on port 443. Listen 443 # Listen for virtual host requests on all IP addresses NameVirtualHost…
user65567
  • 671
  • 2
  • 6
  • 9
38
votes
3 answers

Wildcard vhosts on Nginx

I've just installed Nginx on my server and am extremely happy with the results, however I still cannot figure out how to insert wildcard virtual hosts. This is the [directory] structure I'd like: -- public_html (example.com) ---subdoamin 1…
rorygilchrist
  • 381
  • 1
  • 3
  • 3
35
votes
3 answers

How to set a favicon.ico for a specific Virtual Host on Nginx?

I am using Nginx as my webserver for the first time. I didn't have any trouble to set it up and everything works great. The problem came when the designer asked me if he could send me "the icon in the title bar" to "put it up there". #…
ersamy
  • 453
  • 1
  • 4
  • 5
32
votes
5 answers

Nginx disable .htaccess and hidden files but allow .well-known directory

I have a Nginx server, and disabled hidden files in the nginx_vhost.conf ## Disable .htaccess and other hidden files location ~ /\. { deny all; access_log off; log_not_found off; } But LetsEncrypt needs access to the…
Janghou
  • 475
  • 1
  • 4
  • 7
32
votes
4 answers

What are the differences between Floating IPs and Virtual IPs?

This might be a pedestrian question but what is the difference between a "Floating IP" address and a "Virtual IP" address? Are they synonyms?
Marlon
  • 535
  • 2
  • 10
  • 14
31
votes
9 answers

Why might Apache ignore a virtual host with a ServerName matching the requested URL?

I'm trying to add a second virtual host to my apache configuration, but cannot seem to get the new virtual host to be used. My httpd.conf just contains the following line: ServerName radiofreebrighton.org.uk I also have a ports.conf file, which…
Tom Wright
  • 914
  • 3
  • 12
  • 25
1
2 3
99 100