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 (3)

81
votes
5answers
47k 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 ...
39
votes
4answers
106k 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 ...
31
votes
6answers
40k 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 ...
22
votes
4answers
39k 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 ...
19
votes
8answers
13k 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. ...
18
votes
7answers
9k 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 ...
18
votes
4answers
21k 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 ...
16
votes
5answers
42k 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 ...
15
votes
1answer
18k views

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

How do you configure MAMP to manage/host multiple websites at one time for development?
13
votes
3answers
25k 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 ...
13
votes
5answers
7k 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 ...
12
votes
3answers
15k 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
7answers
10k 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 ...
11
votes
1answer
14k 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 ...
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
7k 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
9k views

How can I configure VirtualHost without restarting Apache web server?

I have mentioned here apache web server because i am using that one.
9
votes
1answer
3k 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
2answers
406 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 ...
8
votes
3answers
13k 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 ...
7
votes
2answers
6k 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; ...
7
votes
3answers
12k 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 ...
7
votes
1answer
167 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
3answers
6k 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
3answers
4k 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?
7
votes
1answer
9k 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 ...
7
votes
5answers
12k 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 ...
7
votes
2answers
18k 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 ...
6
votes
4answers
3k 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/ ...
6
votes
3answers
2k 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 ...
6
votes
2answers
1k views

Apache not finding folder on File System; Appending “\xe2\x80\x9d” to end of File Paths

I have three Virtual Hosts running in apache2 on my personal Macintosh running OS X Mavericks and I have ran into a knot of confusion. They are configured in my httpd-vhosts.conf file as follows: ...
6
votes
1answer
7k 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 ...
6
votes
2answers
3k 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> ...
6
votes
1answer
638 views

How to stop HTTPS requests for non-ssl-enabled virtual hosts from going to the first ssl-enabled virtualhost (Apache-SNI)

I hope that title is clear. How do I prevent HTTPS requests for non-ssl-enabled virtual hosts from going to the first ssl-enabled virtualhost (setup is Apache-SNI). For example, using my abbreviated ...
6
votes
1answer
6k views

How to disable default VirtualHost in apache2?

In apache2 by design, any http request with an unknown Host will be directed to the first loaded VirtualHost. Is there a way to disable this feature? Said differently, I want to have a web server ...
6
votes
3answers
13k views

Virtualhost setup for Ruby on Rails application (mod passenger)

I'm trying to install Redmine under apache. The apache server works on a local network. My apache setup consist on a single virtual host. I can get insto different directories using simply the path ...
6
votes
1answer
1k views

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

Apache2 Virtual Host broken; displayed default index.html on subdomain, but correct content on www.subdomain

I've got a Linode configured as a Ubuntu 10.04.2 web server with Apache 2.2.14. I have a total of 4 sites, all defined under /etc/apache2/sites-available as virtual hosts. All sites are almost ...
6
votes
4answers
5k views

Redirect all non-www subdomains to main www domain with Apache2

I have a website (domain.com) and I would like to redirect all my secondary domains (domain2.com, domain3.com) and all the subdomains of these domains (*.domain.com, *.domain2.com...) to the main ...
5
votes
4answers
5k 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 ...
5
votes
1answer
8k views

ServerName wildcards in Apache name-based virtual hosts?

On our LAN I've set up several 'fake' TLDs in the DNS server, with the intention of using them for Apache name-based virtual hosting. I'd like to combine this with mass-virtual-hosting (i.e. ...
5
votes
3answers
172 views

How to handle a main site plus multiple virtualhosts on one server

I have a standard Ubuntu install. Apache web root is /var/www. I want to host my "main" site and a handful of others. Normally I would put the files for mysite.com right in the web root. However, if ...
5
votes
2answers
134 views

How to disable Apache's primary server feature?

This documentation says that Due to the fact that www.example1.com is first in the configuration file, it has the highest priority and can be seen as the default or primary server. That means that ...
5
votes
2answers
8k views

Apache2: Limit simultaneous requests & throttle bandwidth per IP/client?

I want to limit simultaneous requests & throttle bandwidth per IP/Client on a single apache vhost. In other words, I want to ensure that this site, which hosts large media files, doesn't get ...
5
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> ...
5
votes
2answers
5k views

Apache virtual hosts and reverse proxy

I have many virtual hosts whose domain names map to a single Apache server (let's call it server1). Under certain circumstances, all URLs for a certain virtual host should be served by a different ...
5
votes
1answer
6k views

If directive not working in apache VirtualHost conf, says “Invalid command”

Why?? <VirtualHost *:80> ServerAdmin admin@mydomain.com DirectoryIndex index.php <If "%{SERVER_PROTOCOL} != 'HTTPS'"> Redirect / ...
5
votes
2answers
1k views

Apache Virtual Hosts with SSL

I have a web server with full root access, which hosts 3 domains. They are on the same IP and managed via VirtualHost files running apache2. I would like to add SSL capability to one of them, i.e. be ...
5
votes
4answers
4k views

limit bandwidth and space usage of each Virtual Host?

I am starting a small web hosting company to teach me about system administration and one of the problems I am having is how would I limit the bandwidth and disk space of each virtual host ...