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
7
votes
2 answers

Apache proxy virtual host on backend server

I have 2 web Debian servers, a frontend accepting request from port 80 and a backend via proxy from the frontend. What I want to do is have a many different URLs going the backend server with virtual hosts. Here is the frontend Apache…
tdbui22
  • 103
  • 1
  • 2
  • 6
7
votes
3 answers

Make ip address redirect to real name with Apache

I want that when people access my web server with the IP address, like http://10.0.0.1, be redirected to the domain name, like http://example.com. I'm using Apache Web Server and I've tried: Redirect /…
Pablo Fernandez
  • 7,438
  • 25
  • 71
  • 83
7
votes
1 answer

Virtual Machine Host within Ubuntu Server

Right now I've got ubuntu desktop with virtual box and dozens of virtual ubuntu machines... I'm setting up the next ubuntu server today, and I never thought about the "Virtual Machine Host" in the tasksel @ installation. There's nothing clear on it…
Michael Mikhjian
  • 185
  • 1
  • 1
  • 12
7
votes
1 answer

Apache Virtual Hosts

I seem to be having a bit of trouble with virtual hosts in Apache. I have added 127.0.0.1 www.mysite.com to my hosts file in Windows and I see my web server fine. I then added the below to my conf file, as the very end, I don't know if it matters…
user887515
7
votes
1 answer

Server Alias With wildcard subdomain

I am using WordPress network subdomain setup. I had to put *.mydomain.com as a server alias but now I also have a site subdomain.mydomain.com that leads to another directory. Is there a way of doing this since when I type subdomain.mydomain.com it…
7
votes
1 answer

using wildcards in host-aliases for Tomcat's virtual hosts

I want to do the following with Tomcat 5.5: *.mydomain.com should go to my webapp, located at the virtual host mydomain.com. So I have a virtual host mydomain.com, and I want all *.mydomain.com also go there. Now, if I do this, it doesn't pick up…
Marten Sytema
  • 173
  • 1
  • 7
7
votes
2 answers

How to use basic auth for single file in otherwise forbidden Apache directory?

I want to allow access to a single file in a directory that is otherwise forbidden. This did not work: ServerName example.com DocumentRoot /var/www/html Options FollowSymLinks …
mit
  • 1,914
  • 6
  • 29
  • 42
7
votes
2 answers

Jetty - Virtualhosting - SSL Certificates

I want to have different SSL certificates for different domains that I am hosting in a single Jetty instance. I do not want to front my Jetty application server with Apache. I am running Jetty 6.1.22. So far, I have only seen configurations with a…
Walter White
7
votes
4 answers

Apache configuration with virtual hosts and SSL on a local network

I'm trying to setup my local Apache configuration like so: http://localhost/ should serve ~/ http://development.somedomain.co.nz/ should serve ~/sites/development.somedomain.co.nz/ https://development.assldomain.co.nz/ should serve…
Petah
  • 650
  • 2
  • 13
  • 24
6
votes
5 answers

Is the world ready for name based HTTPS vhost service?

Possible Duplicate: Multiple SSL domains on the same IP address and same port? I'm developing a web app that MUST MUST MUST use HTTPS. It's kinda developed on the cheap though, and I really don't need (or want to pay for) my own dedicated IP…
billpg
  • 585
  • 1
  • 5
  • 17
6
votes
3 answers

When specifying a "host name", do we still need to specify a port?

https://en.wikipedia.org/wiki/Virtual_hosting says Name-based virtual hosts use multiple host names for the same IP address. Does a "host name" correspond to an IP address or a pair of IP address and a port? When specifying a "host name", do we…
Tim
  • 1,487
  • 6
  • 28
  • 43
6
votes
1 answer

SSL_ERROR_RX_RECORD_TOO_LONG certbot

I have the following setup: Apache 2.4 Ubuntu 16.04 LTS letsencrypt / certbot Now, as soon as I enable the following .conf on the default server, all my configured top level domains receive a SSL_ERROR_RX_RECORD_TOO_LONG error. If I disable this…
Michael
  • 63
  • 1
  • 1
  • 4
6
votes
1 answer

Virtual host not working AWS apache

I have following virtual host ( in apache2.conf file ) to load all subdomain from a single directory on AWS DocumentRoot /var/www/html ServerName mydevsite.com ServerAlias mydevsite.com
Vikram
  • 167
  • 2
  • 10
6
votes
1 answer

apache2 and VirtualHost with foreign characters and more than one Alias

I have a simple apache2 setup with two VirtualHosts. One is a domain name with "normal" characters, and one has foreign characters (with punycode). The problem is that I don't know how to add "www" as an alias with the punycode domain. With the…
Frank H.
  • 231
  • 1
  • 10
6
votes
1 answer

Port 80: connection refused. How to fix on Mac OSX?

I've noticed some issues with Apache virtual hosts on two Macs that otherwise have the same kind of set up (in terms of httpd.conf, vhosts, hosts etc.) On one Mac, virtual hosts are served without a glitch, on another, I am getting connection…
Tench
  • 361
  • 2
  • 3
  • 8