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
1 answer

Mod rewrite without .htaccess

Let's suppose I have a website named foo.com I can access foo.com and it runs the index.php found in the root folder. My question is: how should I edit the vhost file to enable rewrite mod without enabling htaccess? My goal is to be able to…
Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
2
votes
2 answers

How can I have an app running using Dokku at port 80 without using VHOST?

I'm trying to run an app using Dokku without using VHOST, using only an IP address, to run on port 80
Sibelius Seraphini
  • 5,303
  • 9
  • 34
  • 55
2
votes
1 answer

Gitlab 7.5.3 with Apache 2.2 on Debian 7 : mysterious hostname on uploads url

I know the topic get endless threads on the web, but I didn't find neither the problem I have nor any close solution. I installed Gitlab 7.5.3 with omnibus package. As I got apache already setted up, I used it to serve GitLab as well. Everything is…
nbonniot
  • 1,034
  • 16
  • 33
2
votes
0 answers

Apache proxypass issue with firefox

I've got a wordpress blog running in a docker container, and I'm trying to reverse proxy to it from a virtualhost in the host's apache config. My vhost config looks like this: ServerName my.vhost.com ProxyRequests …
pguardiario
  • 53,827
  • 19
  • 119
  • 159
2
votes
1 answer

Can't access my Vagrant's remote webserver

I just created a VM using phphpet. Here is my config.yaml file: http://pastebin.com/7rGFYt5e --- vagrantfile-local: vm: box: puphpet/ubuntu1404-x64 box_url: puphpet/ubuntu1404-x64 hostname: '' memory: '1024' …
George Katsanos
  • 13,524
  • 16
  • 62
  • 98
2
votes
3 answers

How to correctly set Documentroot in Apache serving Plone

I have a Plone site called example.com located at /var/www/Plone (I think). I have the following settings for the site located in sites-available for vhosts (excerpt): ServerAdmin webmaster@localhost …
wiedhas
  • 35
  • 7
2
votes
1 answer

Vagrant Vhost with a FQDN (Full Qualified Domain Name)

Take a domain name like: development.mysite.com I want to setup a vhost with Vagrant that would allow me to access this location in my browser. From what I can tell, it won't let me use port 80, so even if I change my hosts file to something like: …
Kerry Jones
  • 21,806
  • 12
  • 62
  • 89
2
votes
1 answer

Apache 2.2 disable unconfigured subdomains

There is a webserver which has example.com, www.example.com, my.example.com, shop.example.com, static.example.com. All sites except www.example.com is on https. My problem is when I type randomstring.example.com -> shop.example.com gets served. But…
Ashrith
  • 655
  • 8
  • 20
2
votes
1 answer

NodeJS Express vhosts and updating app.js

I just set up a NodeJS server and wanted to use the vhost function from Express to allow for easy project setup. I want to be able to create a new directory for a new project without going through the hassle of creating new subdomains…
Cas Cornelissen
  • 616
  • 8
  • 29
2
votes
1 answer

Multiple subdomains and servers behind single DynDNS name?

I've got a dynamic IP from my ISP so I'm using a free DynDNS service to redirect traffic to my server. I just bought a Raspberry Pi and would like to reach it from the outside too, preferrably with another subdomain. Can I use multiple CNAME records…
Zarkov
  • 23
  • 1
  • 4
2
votes
1 answer

Apache VirtualHosts - Exclude a single file from URL redirect

I'm currently redirecting all requests to my Apache server from olddomain.com to newdomain.com -- it works fine but I actually need just ONE file to still be loaded as if it's at olddomain.com. Here's what the important bit looks like…
tylerl
  • 1,160
  • 1
  • 19
  • 41
2
votes
1 answer

Make zend framework 2 work without Virtual Host

I had finished my first web application using Zend Framework 2 and I'm about to put it online. But may web host doesn't allow me to change my vhost configuration! The .htaccess file is allowed. My .htaccess file in Public folder is like…
Chirag Shah
  • 1,463
  • 2
  • 18
  • 40
2
votes
2 answers

Dynamic apache log directory based on hostname

I have a PHP application which is used by multiple domains. To avoid maintaining multiple vhosts, I have just setup a single "default" Apache vhost to direct any incoming request to the server to the application directory. What I want to do is to…
James
  • 1,950
  • 3
  • 22
  • 39
2
votes
1 answer

403 Error on Apache server for Directories that don't exist

I am working on solving an issue within my Apache servers that will return a 403 Forbidden page when I attempt to go to a URL with sub-directories and the sub-directories do not exist. "domain.com/etc/" Will return a 403 Forbidden error instead of a…
2
votes
1 answer

Get Apache Vhosts from Currently Running Apache

So... I accidentally deleted the vhosts files in my sites-available folder. I would like to get my vhosts back. Is there any way to get it from the currently running apache config? I have not restarted yet. This person says no, but this was a few…
styks
  • 3,193
  • 1
  • 23
  • 36