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

ssl certificate for several domains, one IP

AFAIK, SSL is assigned to a single domain name (maybe several subdomains via wildcard). On the other hand i heard that the webserver does not see the domain before it serves the ssl? If I have multiple domains running as vhosts on one IP…
Viktor Trón
  • 8,774
  • 4
  • 45
  • 48
3
votes
0 answers

Can't convert .htaccess to nginx directives

in order to install Taskly crm, I'm trying to convert three simple directives by an .htaccess file to nginx vhosts directives without success. I've installed Cloudpanel on my own vps server and when i add a website it comes with pre-configured…
3
votes
2 answers

400 Bad Request with Symfony2 and html5boilerplate redirect rules

I've recently moved over to using the Symfony2 PHP framework, and wanted to include all of the awesomeness of the html5boilerplate from the outset, however having a few problems with merging the .htaccess files for both. The top three are from…
domudall
  • 418
  • 3
  • 14
3
votes
1 answer

Enable Apache site using Ansible

I am running a playbook from a python script. I am following this code The following command works perfectly. ansible -i path/to/inventory.yml host_name -m command -a"a2ensite site_name" But when I try to do the same by executing a playbook from…
Amarjit Singh
  • 2,068
  • 19
  • 52
3
votes
3 answers

Where is the right place to configure my Apache vhosts in OSX?

I updated my laptop from Mojave to Catalina last night, and this morning I realised that I had lost all my Apache vhosts, my vhost file was replaced with the default file. I had all my vhosts in /usr/local/etc/httpd/extra/httpd-vhosts.conf I would…
nmorell
  • 65
  • 6
3
votes
3 answers

Django StaticFiles APP and Wsgi

It's not so easy questions as others.. at least. it's not a problem to setup simple one-dir-based static files location.. https://bitbucket.org/sirex/django-starter/src There's such an interesting project in here.. this one is using distribute and…
holms
  • 9,112
  • 14
  • 65
  • 95
3
votes
1 answer

setup vhost with nginx on mamp free version

I'd like to setup vhosts on mamp, while usin nginx instead of the default apache server. I browsed stack overflow and the web, but all I could find was either about pure nginx (speaking about the sites-available folder which isn't created by…
Jonathan Simonney
  • 585
  • 1
  • 11
  • 25
3
votes
1 answer

Apache 2 VHost - www.domain.com works but domain.com goes to registrar

I am using the following VHOST: #Basic setup ServerAdmin administrator@mydomain.com ServerName www.mydomain.com ServerAlias mydomain.com
Hanpan
  • 10,013
  • 25
  • 77
  • 115
3
votes
0 answers

Chrome allow insecure localhost flag does not work with vhosts

I am setting up an apache developement environment on my computer. I want to work with virtual hosts and HTTPS, so I set up vhosts and SSL certificates with openssl as well. Everything works fine, but I want to get rid of the security warning in…
Dajer
  • 108
  • 8
3
votes
1 answer

Docker Compose | Virtual Hosts

Whats wrong in my code? thanks in advance! I'm trying to set up a virtual host for my docker container. On localhost: 8000 works perfectly, but when I try to access through http: //borgesmelo.local/ the error ERR_NAME_NOT_RESOLVED appears, what can…
Roberto Godoy
  • 185
  • 1
  • 2
  • 8
3
votes
1 answer

Monkey patching _ssl_wrap_socket in Python requests library isn't executing

We are trying to add HTTPS support to a web server virtual host scanning tool. Said tool uses the python3 requests library, which uses urllib3 under the hood. We need a way to provide our own SNI hostname so are attempting to monkey patch the…
Michael A
  • 9,480
  • 22
  • 70
  • 114
3
votes
1 answer

Apache2 default host not served - ispconfig

I've run across the following issue with my ISPconfig/apache2 Setup: my default host 000-default is not being served. When I enter the server-ip, the Server hostname into my browser, the Server is serving a Domain Name that starts with a number. My…
Malte
  • 43
  • 5
3
votes
3 answers

How to make mod_rewrite *not* perform home directory expansion when using .htaccess

Filepath: /Users/user_name/Sites/example.com Browseable at: http://localhost/~user_name/example.com/ In a child directory (chrome) I got a .htaccess like this: Options +FollowSymLinks RewriteEngine on RewriteRule…
anddoutoi
  • 9,973
  • 4
  • 29
  • 28
3
votes
2 answers

Express vhosts + https

Is there any way I can run vhosts on Express with https? My current code (non-SSL) looks like this: var express = require('express'); var vhost = require('vhost'); var path = require('path'); var appOne = express(); var appTwo = express(); var…
3
votes
2 answers

Where do MediaTemple (dv) vhosts configuration files live?

This question is specific to MediaTemple Dedicated-Virtual servers. When I add a new vhost through the Plesk Panel, where is the vhost configuration saved? There is no /etc/httpd/conf/httpd-vhosts.conf and there is nothing in…
andrhamm
  • 3,924
  • 4
  • 33
  • 46