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)

64
votes
5answers
38k 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 ...
27
votes
4answers
63k 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 ...
23
votes
7answers
26k 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 ...
20
votes
4answers
36k 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 ...
16
votes
7answers
7k 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 ...
14
votes
8answers
9k 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. ...
12
votes
4answers
10k 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 ...
10
votes
1answer
14k 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?
10
votes
7answers
7k 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 ...
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
5answers
30k 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 ...
9
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 ...
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
364 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
5answers
3k 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 ...
7
votes
2answers
7k views

How can I configure VirtualHost without restarting Apache web server?

I have mentioned here apache web server because i am using that one.
7
votes
3answers
9k 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 ...
7
votes
1answer
146 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
1answer
2k 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 ...
6
votes
3answers
9k 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 ...
6
votes
3answers
4k 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> ...
6
votes
4answers
2k 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
1answer
5k 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
12k 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
4answers
9k 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 ...
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
4k 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
1answer
5k 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 ...
5
votes
1answer
7k 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 ...
5
votes
3answers
153 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
1answer
4k 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 ...
5
votes
2answers
119 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
6k 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
1answer
7k 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 ...
5
votes
4answers
3k 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
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
3k 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 ...
5
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 ...
4
votes
2answers
226 views

How does a domain beginning with www.uk get resolved?

I have seen domains such as www.uk.domain.mobi. Is there no restriction in terms of what is allowed after www? Can I call a subdomain anything I like and is there no dot-separated word limit?
4
votes
4answers
3k 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 ...
4
votes
1answer
4k views

port to subdomain

I have installed Hudson using apt-get, and the Hudson server is available on example.com:8080. For example.com I use standard port *:80 and some virtual hosts set up this way: # ...
4
votes
3answers
8k 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 ...
4
votes
3answers
2k views

How to monitor Apache VirtualHost activity

I have a webserver that runs a number of virtualhost websites. Every once in a while there will be a situation where the server load goes really high, or the network response is very slow on the ...
4
votes
3answers
2k 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?
4
votes
2answers
328 views

2 Domains on 1 server

I'm running Debian and I don't have a control panel or anything. Right now, I'm simply pointing my domain to the server IP and it's going to the root, but I am looking to add another domain, so how ...
4
votes
1answer
6k 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. ...
4
votes
3answers
2k views

Way to configure apache for ~125 django sites to optimize memory usage (mod_python v mod_wsgi; worker vs prefork; static files)

I'm currently running 125 Django sites on a single dedicated box at GoDaddy. The sites are relativelly low traffic and I'm wondering what i can do to optimize the memory usage in my apache config. ...
4
votes
1answer
2k views

How can I monitor bandwidth usage by Virtual Host in Apache on Ubuntu

My Environment: Apache 2.2.9, Ubuntu 8.10 I am trying to find a way to monitor the bandwidth usage on my server broken out by each virtualhost WITHOUT installing something like PLESK, CPanel, or ...
4
votes
2answers
6k views

Multiple Rails sites using Passenger and VirtualHosts?

What I am trying to do is run multiple Rails apps from a server machine at work. We dont have multiple hostnames for the box. We want to host some rails apps on it as well as our php apps. Currently ...