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

Restricting a staging server

I am thinking of methods to restrict public users from accessing sites on our staging server. The best method I can think of at the moment is use: Deny from all Allow IP Addresses If I add this to vhost configuration then it will do what I need. Is…
Ian Jamieson
  • 4,376
  • 2
  • 35
  • 55
0
votes
1 answer

Connecting Coda to local Wordpress install hosted with Mamp Pro

I have been using Coda and regular version of Mamp for local development for longtime without getting into this permission mess. I recently, upgraded to Mamp Pro and setup it with VHosts. I have a site example.com with it's root path set to…
John
  • 1,178
  • 5
  • 20
  • 36
0
votes
1 answer

vhost setup to redirect multiple domains names and www version to single non-www domain

I own two domain names: domain.com domain.net …and I can't determine how to best setup the vhost code in order to achieve a few things: If a visitor types in either of those two domain names, they go to domain.net If a visitor types in either of…
Marc Amos
  • 137
  • 2
  • 11
-1
votes
0 answers

Does setting up a vhost in Apache to redirect to a different port or IP address impact server performance?

I'm considering setting up a virtual host (vhost) in Apache to redirect traffic to a different port or IP address. I'm wondering if this would put any extra load on my Apache server. Specifically, I'm interested in understanding the potential impact…
MoltoGames
  • 17
  • 1
  • 8
-1
votes
1 answer

How to redirect example.com to example.com/mypath/mypage from vhost file

Problem statement: How to redirect example.com to example.com/mypath/mypage from vhost file Configurations done: Added below entries in vhost SSL and on SSL both & restarted httpd RewriteEngine On RewriteCond %{HTTP_HOST} !^www.example.com…
Azhar
  • 933
  • 1
  • 12
  • 28
-1
votes
1 answer

How does nginx virtualhosts know the domain?

Hello stackoverflow community! How does nginx know from which domain the url comes from in order to serve the right page? I tried adding the domain and the full url to the Referer header but that did not work. Is there any way to access the ip of…
-1
votes
3 answers

Files not showing up because looking at root but I think I specify the root!

I'm working locally and I always specify files as /files.jpg or whatnot so the server will always know to look at the root level to find the files. That way if I'm on a subpage it won't choke. But locally the files do not show up. My file structure…
rich
  • 139
  • 1
  • 1
  • 4
-1
votes
2 answers

How to setup HTTP basic auth for apache vhost running Laravel

I am trying to set up HTTP basic auth for the Laravel app in apache vhost but it is not working. It keeps asking for a password after each request made This is my current vhost content for the site and at the moment it is not doing anything. Any…
z0mbieKale
  • 969
  • 1
  • 14
  • 44
-1
votes
1 answer

How to Configure rewrite rule , so that the request will route to server name even if alias name is used in URL

We have a virtual host file with below content, NameVirtualHost *:8888 ServerName example.domain.com ServerAlias example DocumentRoot /opt/weblogic/product/virtualhosts/example.domain.com/htdocs …
Vamsi
  • 13
  • 1
  • 5
-1
votes
1 answer

Apache Virtual Host, host webside without alias

I can host a website using Alias. Than the URI look like: www.myside.com/alias I achive this using this in /etc/apache2/sites-available/www.myside.com.conf Alias /alias"/usr/local/tomcat/alias" Options…
ru4ert
  • 998
  • 2
  • 14
  • 25
-1
votes
2 answers

How to configure apache VHost to work with axios.post?

I'm attempting to call a webservice via POST from a create-react-app application to a local vhost running on XAMPP (also tried WAMP) with Windows 10 as the OS. The local environments http://test.local/ - Local server running on an XAMPP…
Shane
  • 4,921
  • 5
  • 37
  • 53
-1
votes
1 answer

virtual host not directing to correct folder

Disclaimer - I am a Linux and Wordpress noob. Boss says make it work, so I try. We have multiple sites configured on an Ubuntu box. While the site was being developed, I was able to configure the site to be access using dev.website.com. When the…
Robochek
  • 1
  • 1
-1
votes
1 answer

Best choice in this nginx configuration

Being building a virtualhost for wordpress, I would like to know if this set seems correct or not at all. location / { try_files $uri $uri/ =404; } location / { try_files $uri $uri/ /index.php?$args; } The second line comes from…
Barbosa
  • 19
  • 5
-1
votes
1 answer

Laravel log could not be opened (permission denied) on localhost (XAMPP)

I installed Xampp, downloaded Laravel into my Onedrive, and set up a vhost. But now, when I start the webserver, I get the following error: [Fri Feb 23 09:16:10.112460 2018] [php7:error] [pid 18040:tid 1968] [client 127.0.0.1:63837] PHP Fatal…
Jordy
  • 4,719
  • 11
  • 47
  • 81
-1
votes
1 answer

OS X Apache2 vhosts hosts domain not working

Setting up my local dev environment due to an update in OS X pushing new Apache Files. This setup works fine when going to localhost or http://127.0.0.1 but when I setup the hosts file like so 127.0.0.1 bears.dev www.bears.dev bears.dev just…
BITmixit
  • 53
  • 1
  • 8