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.

learn more… | top users | synonyms (5)

93
votes
5answers
58k views

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 ...
47
votes
7answers
58k views

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: <VirtualHost 192.168.1.2 204....
45
votes
4answers
151k views

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: <VirtualHost *&...
33
votes
1answer
13k views

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 ...
24
votes
4answers
33k views

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 ...
23
votes
4answers
42k views

How can I solve the apache2 httpd error “mixing * ports and non-* ports with a NameVirtualHost address is not supported”

Here is the error I get when booting up Apache2: * Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [Wed ...
22
votes
5answers
6k views

A domain I've never heard of resolves to my website [duplicate]

I've discovered (via looking at mod_pagespeed cache entries) that a completely random domain I've never heard of before is resolving to my website. If I visit this domain, my website loads. The DNS ...
22
votes
8answers
18k views

How can I see how much bandwidth each Apache Virtual Host is using?

I have Apache set up to serve several Virtual Hosts, and I would like to see how much bandwidth each site uses. I can see how much the entire server uses, but I would like more detailed reports. ...
21
votes
7answers
10k views

Resolving to virtual host very slow on Mac OS X Lion

Since upgrading to Mac OS X Lion (from Snow Leopard), I have noticed that resolving to a virtual host is very slow (between about 3 seconds). I have found a number of tips (e.g., not using the .local ...
20
votes
5answers
56k views

How to find all hostnames in DNS attached to one IP?

If I have multiple hosts configured on one machine (a la apache's VirtualHosts), how can I do a lookup on the IP and find all domains configured to reach it? For example, I have several web and email ...
19
votes
3answers
44k views

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 ...
18
votes
1answer
23k views

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 ...
17
votes
1answer
22k views

How to set up multiple websites / virtual hosts on MAMP? [closed]

How do you configure MAMP to manage/host multiple websites at one time for development?
15
votes
5answers
11k views

Redirect to SSL only if browser supports SNI

I have Apache 2.2 with mod_ssl and a bunch of sites in HTTPS on the same IP/port with VirtualHosting, so client must support SNI to connect to those virtual hosts. I would like to configure my server ...
14
votes
3answers
23k views

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 ...
12
votes
3answers
19k views

“Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile]” error

After recently upgrading Apache2 to version 2.2.31 I found a strange behaviour in SSL VirtualHost setup. A few of the website I'm hosting were showing the certificate for the default host even if the ...
12
votes
2answers
6k views

Best way to prevent default server?

I have a number of vhosts, and I'd like to "turn off" the default vhost, either by blank page, error page, or generally whatever is the most efficient use of Nginx's resources, whilst only allowing ...
12
votes
2answers
7k views

Turn off error and access logs for one virtual host

If I dont set a error log inside a virtual host it will default to the default error/access log. Is there a way to turn this off for one virtual host?
12
votes
7answers
13k views

“Catch-All” access log with Apache Virtual Hosts?

I have many virtual hosts set up on a web server, each one having its own error and access log. The relevant lines of httpd.conf are something like this: ErrorLog /var/log/httpd-error.log LogFormat "...
12
votes
2answers
40k views

what is .crt and .key and how can I generate them?

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
11
votes
2answers
12k views

How can I configure VirtualHost without restarting Apache web server?

I have mentioned here apache web server because i am using that one.
11
votes
2answers
13k views

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 ...
11
votes
2answers
9k views

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

I want to know the difference between "default:*" and "*:*" in VirtualHost Context. <VirtualHost _default_:*> #... ServerName host.example.com #... </VirtualHost> <...
10
votes
2answers
20k views

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: -- ...
10
votes
1answer
10k views

Apache SSL VirtualHosts on a single IP using UCC/SAN certificate

I need to host several Apache virtual hosts with SSL from a single IP. Now - I understand that because SSL wraps around the HTTP request, there's no way to know which host is being requested until a ...
10
votes
5answers
17k views

How to create a multi-domain self-signed certificate for Apache2?

I've got a little private webserver where I have several virtualhosts. I know that it's impossible to assign a certificate to each individual virtualhost, because the server finds out which ...
10
votes
2answers
6k views

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 ...
10
votes
2answers
8k views

Separate php.ini file for each Apache virtual host?

Is it possible to have a separate php.ini file that overrides the default php.ini file for each virtual host? I'm running Apache/2.2.14, PHP 5.3.2-1. For example, I have several vhosts pointing to ...
9
votes
2answers
13k views

Multiple SSL vhosts using wildcard certificate in nginx

I have two hostnames sharing the same domain name which I want to serve over HTTPs. I've got a wildcard-SSL certificate and created two vhost configs: Host A listen 127.0.0.1:443 ssl; ...
9
votes
3answers
33k views

.htaccess is ignored even though VirtualHost has “AllowOverride All”

I'm running a LAMP server on Fedora 13 that's working fine; however, I just added an ".htaccess" file to my current site's docroot folder that is being completely ignored. I've tried half a dozen ...
9
votes
4answers
20k views

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 ...
9
votes
1answer
4k views

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 ...
9
votes
2answers
1k views

How to check CentOS 6 Server VM Host after a power falure?

This afternoon, someone at our office decided to pull the plug out of our server because it was storming outside. They didn't shut it down, they just pulled the plug out while it was running. The ...
8
votes
8answers
939 views

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 ...
8
votes
2answers
428 views

Is there a way to access a specific server with the hostname in a round-robin setup?

I have a cluster of Apache webservers using round-robin for primitive load balancing. Is there a way to have firefox or chrome request that server name from a specific IP? If you just enter the http:...
8
votes
4answers
21k views

Need help trouble shooting Https webserver error - SSL Handshake failed

I followed this guide: http://hints.macworld.com/article.php?story=20041129143420344 Here is my virtual host definition <VirtualHost *:443> SSLEngine on SSLProxyEngine On ...
8
votes
4answers
2k views

Is it possible to set an SSLProtocol in Apache for a single VirtualHost (poodle)?

I'm trying to test a patch for the poodle vulnerability that involves disabling SSLv3 on my web server. In order to test this on a non-production environment first, I'm setting the SSLProtocol on a ...
8
votes
3answers
12k views

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?
8
votes
3answers
211 views

Webserver randomly serves different vhosts

We've got nginx running on Ubuntu Trusty. It serves several websites over https, running on one ip address. Randomly, although it seems slightly related to work load, sometimes single requests turn ...
8
votes
1answer
284 views

How to automate zabbix web scenarios for vhosts?

I'm new to Zabbix and enterprise monitoring. I've just finished installing Zabbix 2.4. I'm trying to monitor the state of all our vhosts dislocated on different servers. Until now the only solution ...
7
votes
5answers
7k views

Apache virtual host based on *source* IP

Is it possible to configure Apache for different virtual hosts based on the source IP? (i.e. same interface, same hostname, but two different virtual hosts, with different content, based on source IP....
7
votes
3answers
8k views

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 <VirtualHost localhost:80> ServerName localhost DocumentRoot "/www/drupal5" <Location /server-status> ...
7
votes
4answers
4k views

Apache Named VirtualHosts with wildcards

I want to map www.example.com to a specific virtual host and then I want all other subdomains of example.com to go to another virtual host. To do this I created these hosts: <VirtualHost *:80> ...
7
votes
1answer
187 views

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 ...
7
votes
4answers
2k views

Nginx. How do I reject request to unlisted ssl virtual server?

I have a wildcard SSL certificate and several subdomains on the same ip. Now I want my nginx to handle only mentioned server names and drop connection for others so that it'd look like nginx is not ...
7
votes
3answers
4k views

Using VirtualDocumentRoot *only* if a suitable document root exists

I'd like to set up an environment where Apache virtual hosts can be dynamically created without reloading the configuration. I can do this with mod_vhost_alias, I set up my default virtual host ...
7
votes
4answers
5k views

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://...
7
votes
1answer
9k views

mod_deflate - Optimal configuration for most browsers

I was wondering if someone here could help me determine the optimal standard configuration for using mod deflate with Apache. Basically, mod_deflate recommends using the following configuration for ...
7
votes
1answer
2k views

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 ...
7
votes
3answers
664 views

Connection Refused for Apache 2.4 Virtual Host [duplicate]

I have Apache 2.4 running on Mac OS X. apachectl configtest give me: Syntax OK. I have two virtual hosts set up, one called localhost, one called test.dev. <VirtualHost *:80> DocumentRoot "...