Using Apache Virtual Host, you can run several websites on the same server.

learn more… | top users | synonyms

22
votes
5answers
4k 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 ...
20
votes
1answer
6k 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 ...
11
votes
3answers
15k 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 ...
5
votes
1answer
3k 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 ...
5
votes
3answers
2k views

Debian - how to dump virtual hosts

With Apache 2 running on windows or other Linux distros (eg Centos) you can show a list of virtual hosts by typing httpd -S at the command line. You get a nice listing of virtual hosts and where they ...
5
votes
2answers
8k 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: -- ...
5
votes
5answers
396 views

Is the world ready for name based HTTPS vhost service? [duplicate]

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

Why am I getting this error in the logs?

Ok so I just started a new ubuntu server 11.10 and i added the vhost and all seems ok ...I also restarted apache but when i visit the browser i get a blank page the server ip is http://23.21.197.126/ ...
4
votes
2answers
1k views

vhost setup for multiple SVN repositories on same server

I have 2 svn repos on my EC2 instance. They are located in /ebs/svn/repo1 & /ebs/svn/repo2. I have created a domain alias svn.mydomain.com, to point to the parent directory of above (/ebs/svn). ...
4
votes
2answers
91 views

Redirect a subdomain to a directory with vhosts

I'd like to redirect a subdomain to a user directory. So I've tried this config, but it seems redirect to the root folder. <VirtualHost *:80> ServerName epnet.fr ServerAlias *.epnet.fr ...
3
votes
3answers
235 views

Deny requests for other domains in Apache 2

Let's say I have xy.com running on a server powered by Apache. It's the default virtual host. Now someone has rewritten his hosts file to redirect yz.com to my server's IP. As my server doesn't know a ...
3
votes
2answers
2k 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 ...
3
votes
4answers
680 views

Nginx rewrite rule “^/([a-z0-9]{32})\.png$” not working (used to work on Apache)

I have these rewrite rules (I tried both with no avail): location ~* "^/([a-z0-9]{32})\.png$" { rewrite ^ /index.php?page=log&id=$1 last; } and location ~* ...
3
votes
1answer
4k views

How do you set server specific ENV values in Nginx?

I am starting a project that uses environment variables to set the database connection and a couple other things. (They didn't want to use configuration files since people are careless and overwrite ...
3
votes
1answer
82 views

Webserver vhost configuration in database?

I know it's possible with lighttpd, but is there a way to achieve the same thing with Apache or better yet, nginx?
3
votes
1answer
195 views

Apache stops communicating with memcache after creating too many vhosts

I've noticed a very peculiar problem with Apache. I have a very high number of virtual hosts set up - it's around 501. Problems started occuring after vhost number 493. First 493 vhosts work as ...
3
votes
1answer
195 views

Is there any soft / hard limit on the number of virtual hosts that Nginx can handle?

And what are performance implications? Is it practical to host tens of thousands of vhosts on one Nginx instance? How much would the increased latency be? We plan to offer custom domains for users, ...
3
votes
1answer
114 views

Concerns about Apache per-Vhost logging setup

I'm both senior developer and sysadmin in my company, so i'm trying to deal with the needs of both activities. I've set up our apache box, wich deals with 30-50 domains atm (and hopefully will grow ...
2
votes
2answers
10k views

Apache 2 Symbolic link not allowed or link target not accessible

My apache server runs as user foo. I have some Rails applications in /home/foo/app1 /home/foo/app2. Each of them has an vhost <VirtualHost *:80> ServerName app1.foobar.com ServerAlias ...
2
votes
1answer
262 views

Redirect https .com to https .co.uk without a valid SSL cert on .com without DNS change

I have an SSL cert valid for the www. and . subdomains on a domain. That's up and working great. All traffic on http redirects to https, and all bare domain traffic redirects to the www. version. In ...
2
votes
1answer
3k views

Server Alias With wildcard subdomain

So i am using WordPress network sub-domain setup. I had to put a *.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 ...
2
votes
3answers
269 views

What HTTP status code should an unconfigured domain return?

What HTTP status code should an unconfigured vhost domain name return? I have a vhost setup where I catch all unconfigured domains into a default vhost and serve a page informing that it is ...
2
votes
1answer
143 views

Apache vhosts 2 domains

com and .co.uk domains, is it possible to create a virtual host to point to a single directory on the box? At present I have <VirtualHost *:80> ServerName www.domain.co.uk ServerAlias ...
2
votes
2answers
508 views

Run apache as different user for different domains

I have a server that is running multiple websites using vhosts, but I want each site to run under a different user/group and wondering if anyone knows how to do this in apache
2
votes
3answers
365 views

403 error when trying to access webroot

I was messing around with virtual hosts and now I'm getting a 403 error when trying to access files on the webroot. Here's my httpd-vhosts.conf: NameVirtualHost *:80 <VirtualHost *:80> ...
2
votes
2answers
129 views

Add www subdomain to my Wildcard Virtualhost

On my local dev server, I set up test sites with the domain like this projectName.dev Using the setting below in my Apache config file... NameVirtualHost *:80 <VirtualHost *:80> ...
2
votes
1answer
71 views

Load balancer apache what's wrong

I' trying to make a load balancing using apache but when I got to my (Local)host 'load' got Not found I've been load those mods LoadModule proxy_module modules/mod_proxy.so LoadModule ...
2
votes
2answers
81 views

apache2 points non-www to root instead of website folder

I have few different vhost created and every one has its own folder in /var/www/ like this /var/www/example1/ /var/www/example2/ Now, when I type url with www www.example1.com it points to the ...
2
votes
1answer
713 views

Newly added virtualhost not working, domain points to /var/www/

I've had no problem with vhosts before, but for some reason this one isn't pointing to the right document root. The domain is pointing to the correct IP, apache sees no errors with the config file in ...
2
votes
1answer
957 views

Apache serving different directory

I have defined a single vhost configuration (see below) for a domain. All HTML files in the root get served properly. But I can't access any files within a particular sub-directory called 'icons'. ...
2
votes
2answers
404 views

HTTPS on separate domain name from HTTP

I have a single Apache 2.0 httpd instance that I'd like to host both HTTP and HTTPS. They share the same IP address and HTTP would come on port 80 and HTTPS on port 443 (standard). I have 2 domains ...
2
votes
2answers
152 views

Apache vhosts - How do I route many sites one way, but route dev site differently?

127.0.0.1 developmentsite.com 127.0.0.1 blockeddomain1.com 127.0.0.1 blockeddomain2.com I would like to block the last 2 domains (and a bunch of others). For this I have added the following vhost ...
2
votes
1answer
76 views

Apache: multiple domains handling

So I use following schema to handle multiple sites on my apache: <VirtualHost 192.168.1.100:80> # get the server name from the Host: header UseCanonicalName Off VirtualDocumentRoot ...
2
votes
1answer
492 views

Website on nginx server requested from subdirectory

we have two nginx servers. The first server receives a request via www.example.com/partner. He sends the whole request to the second server which has php+fastCgi configured. Nginx access log from ...
2
votes
1answer
258 views

lighttpd adding vhost error

I'm trying to have multiple domains. Followed the instructions from web and added the lines in lighttpd.conf file: $HTTP["host"] =~ “(^|.)example.com$” { server.document-root = ...
2
votes
1answer
900 views

Using separate php.ini files per vhost in Xampp

My web host provides separate php.ini files per web root, which is quite useful as I host some websites which require different PHP settings. But on my dev system where I use Xampp, I can only find a ...
2
votes
1answer
143 views

Apache2.4 and HHVM as FastCGI - Different settings per VHost?

I just managed to set up a Apache 2.4 server using HHVM in FastCGI mode using that ProxyPassmatch directive. The problem is, I can now set a differen root path for each host but I can not set any ...
2
votes
2answers
640 views

Conflict between SNI and HTTP provided domains

I have recently moved a WordPress website with a smal lstore from one hosting provider to a server of my own running Ubuntu Server 12.04.2 LTS and Apache 2.2.22. I require SSL for the store. I setup a ...
2
votes
1answer
77 views

vhosts with various hosts and http/https

I have the file underneath in my vhosts.d directory and it's called hosts.conf (from what I gather the name isn't a problem). Now there are various hosts as you can see, if I use http (port 80) no ...
2
votes
1answer
48 views

Access all websites on a server via a shared domain

My setup is: Nginx(80) as a transparent proxy Apache(81) as back-end web server The paths to each domain on the server are like this: /var/www/$username/data/www/$domainname Of course to access ...
2
votes
4answers
911 views

Managing lots of Apache vhost ServerAliases

So I've got this site that's being served as a virtual host by Apache 2. And it has a metric ton of alternative domain names that are all supposed to resolve to it. Up to now I've handled things like ...
2
votes
1answer
372 views

Secure Apache PHP vhost configuration

I'm looking to secure some websites running under apache using suexec. At the moment php is executed with the user/group of the file being executed. This seems to me, not secure enough. It stops ...
2
votes
1answer
866 views

How to configure Apache and Tomcat with vhosts?

I have a server with a static, public IP address. I also have a registered domain name. For the sake of illustration, let's suppose they are IP Address: 12.34.56.78 Domain Name: example.com I ...
2
votes
4answers
1k views

Multiple SSL Certificates Running on Mac OS X 10.6

I have been running into walls with this for a while, so I posted at stackoverflow, and I was pointed over here... I am attempting to setup multiple IP addresses on Snow Leopard so that I can develop ...
2
votes
2answers
348 views

Apache setup for multiple sites with common files

Just realised i posted this on stack overflow by mistake, so here it is in the correct place! I have approx 50 sites that all use the exact same files other than CSS and IMAGES, i currently ...
2
votes
1answer
105 views

Apache: Serving same file on multiple vhosts using regex

I have various virtual hosts (vhosts) setup on an Apache 2.2 server such as: examplea.domain exampleb.domain testsitea.domain testsiteb.domain testsite.domain othersitea.domain On virtual hosts ...
2
votes
1answer
76 views

VHosts config location

I removed Plesk from my server and now I'm trying to figure out how the virtual hosting works. My etc/apache2/apache2.conf and etc/apache2/sites-available/default both appear to point to /var/www/ ...
2
votes
0answers
237 views

Change domain (vhost?) on Gandi simple hosting

I have a Gandi Simple Hosting account and a domain (domain 1) which I also registered through Gandi. Gandi hosting is unfamiliar to me as it uses instances that don't have IP addresses. Currently I ...
2
votes
1answer
74 views

What is the best setup of mod_mono with more virtual hosts?

I have VPS on debian, where I want to host at least 20 virtual hosts running mono application. On PHP I was using mpm_itk to run each vhost under its own user (I thing it is good for security and ...
2
votes
2answers
1k views

httpd vhosts config (with Varnish) - 1 server /w multiple domains

I've been reading multiple questions about this topic but I can't seem to get it working... I have a server running CentOS with HTTPD running 1 website under the default httpd root: Listen 8080 ...