Questions tagged [vhosts]

A virtual host of a HTTP/HTTPS webserver (virtual host in Apache, server block in nginx, ...)

A virtual host of a HTTP/HTTPS webserver (virtual host in Apache, server block in nginx, ...). Use this tag if your question refers to configuration and/or bugs in relation to the virtual host you configured for your application.

The term Virtual Host refers to the practice of running more than one web site (such as company1.example.com and company2.example.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user.

Apache was one of the first servers to support IP-based virtual hosts right out of the box. Versions 1.1 and later of Apache support both IP-based and name-based virtual hosts (vhosts). The latter variant of virtual hosts is sometimes also called host-based or non-IP virtual hosts.

https://httpd.apache.org/docs/2.4/vhosts/

1009 questions
2
votes
4 answers

Mac OS X 10.8 MySQL connection error: localhost does not work, 127.0.0.1 all OK

I have now a new MabBook with 10.8 and I am trying to set up all the Apache & MySQL etc. Apache successfully runs including vhosts. In my /etc/hosts I have all the local hosts set including 127.0.0.1 localhost etc. When I try to coennct to one of my…
schurtertom
  • 520
  • 1
  • 9
  • 19
2
votes
0 answers

dynamic document root in vhost.conf

I want to make a subdomain for every teammember on a localserver (windows, wamp) in wich they can create folders which are seperate websites. for example: member1.local.dev/projectx/ member2.local.dev/projecty/ member2.local.dev/projectz/ But i…
Björn
  • 5,696
  • 1
  • 24
  • 34
2
votes
1 answer

Apache DocumentRoot to a Network Directory for Virtual Host

NameVirtualHost *:80 ServerName tmp DocumentRoot "//192.168.1.25/www/" Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all This configuration is not working,…
Wasim A.
  • 9,660
  • 22
  • 90
  • 120
2
votes
0 answers

Magento Multi Store Redirect loop

I'm using Magento 1.6.2.0., Apache, Fast CGI, OpenSUSE I have set up Multi Store successfully by redirecting a different domain using vhost.conf and vhost_ssl.conf, and by altering the .htaccess in the 'root' domain. I need to do it this way…
njwrigley
  • 21
  • 3
2
votes
3 answers

Multiple virtual hosts via Varnish, incorrect backend if served

I have several backends set up, each one is detected in the VCL and then the correct set up applied. This works for some of the sites, but a few get pointed to the same site. I have read this and applied this, it works for some, but not for…
Jake N
  • 10,535
  • 11
  • 66
  • 112
2
votes
3 answers

Error after adding vhost to httpd.conf - centos

I added the following text to httpd.conf at the bottom: ServerAdmin foo@bar.com DocumentRoot /var/www/html/some_dir/ ServerName foo-bar.example.com ErrorLog …
AO_
  • 2,573
  • 3
  • 30
  • 31
2
votes
3 answers

apache: don't have permission to access / on this server. when I am using virtualhost

For example, the document root of virtualHost is /var/www, and server name is aaa.com. However, apache will tell me forbidden if I access the server with localhost and aaa.com. If I change the Directory option in http.conf to /var/www, apache will…
remy
  • 1,255
  • 6
  • 20
  • 27
2
votes
1 answer

Config for serving website on nginx server via sub url

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 second server: "GET /partner/ HTTP/1.0" 200 2845 On…
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
2
votes
1 answer

Apache location match wildcard URL

My VHOST currently looks like: DocumentRoot /data/sites/example_deploy ServerName deploy.example.co.uk Options +SymLinksIfOwnerMatch AllowOverride All …
HGSSO
  • 55
  • 1
  • 8
1
vote
1 answer

Stopping robots on all on a VirtualHost and all of it's subdirs

I have a development 'environment' under a virtual host on an apache server. I'd to block this virtual host and all of it's sub directories for being indexed by search engines. I have this code (which I pulled from another question on here) but his…
Clarkey
  • 698
  • 3
  • 11
  • 28
1
vote
1 answer

Zend Framework with subdomains

Im having a problem getting zend framework to play nicely with subdomains on my server. I have a LAMP stack running on ubuntu 11.10, I am also using a dynamic dns service where I have my zone records defined. So basically my dns is setup…
John
  • 465
  • 1
  • 4
  • 17
1
vote
1 answer

How to add subdomain on local machine

I have modified my etc/hosts file (under Windows 7), so that www.example.com and demo.example.com both point at localhost. Unfortunately accessing demo.example.com, takes me to localhost's document root (which is logical). I want to change this to…
Eduard Luca
  • 6,514
  • 16
  • 85
  • 137
1
vote
1 answer

Sharing 404 page across node.js apps connected via VHOST

I am sorta new to node.js and web programming in general so excuse if I ask strange questions :D So here is the way I am setting up my express node.js project. I have a top level app.js simply to redirect traffic to a few subdomains: var app =…
1
vote
1 answer

modifying URL - whitelabeling/VHosts

I have recently implemented white labeling, and after changing my VHOSTS setting I have found that some of the URL is stripped, for example: ServerAdmin webmaster@localhost DocumentRoot C:\xampp5.2test\htdocs\portal …
bobo2000
  • 1,779
  • 7
  • 31
  • 54
1
vote
3 answers

Bulk 301 redirect from htaccess

I have spreadsheet which has column of 404 error link and its respective 301 redirects. for e.g) 404 error page 301 redirect http://www.abc.com/1.php http://www.abc/com/2.php .............. …