Questions tagged [virtualhost]

The term Virtual Host refers to the practice of running more than one web site (such as www.company1.com and www.company2.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.

The term Virtual Host refers to the practice of running more than one web site (such as www.company1.com and www.company2.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.

3113 questions
0
votes
2 answers

How can I move a validation into a common file and import it?

I have multiple virtual hosts, managed by Nginx. I received a ticket which asks me to validate the value of a request header for some virtual hosts and refuse serving requests if the header is absent or invalid. This is what I have added to each of…
Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
0
votes
0 answers

is it legal to use "new" as a domain extension on localhost?

In my WSL2 i use lamp and a virtual host that redirects to a laravel app. however it fails all the time to redirect to a xxx.new local url. i use o/c the hosts file to redirect. changing the ext' to anything else works.. is it possible to force it…
yossi
  • 3,090
  • 7
  • 45
  • 65
0
votes
1 answer

create apache virtual host

I have to create api.conf in /etc/apache2/sites-available dir in a server(xyz02.software.com). The apache config is managed via apache module(apache::vhost) in role::script..so basically it is ///modules/role/manifest/script.pp......
sameer
  • 1
  • 2
0
votes
0 answers

Multiple django instances on Apache Windows using the same virtual host

I have a WAMP Server 3.2 (Apache 2.4.46) installed on Windows 10 (64-bits), it is exposed to the local company network. I need to deploy several django projects under the same host - the company network doesn't allow another ServerName. Is it…
0
votes
1 answer

How to setup quasar project to run on virtualhost apache

I want to run my quasar project on domain.local I have setup my configuration file as below My configuration: ServerName domain.local ServerAlias *.domain.local DocumentRoot /project/ AllowOverride All …
0
votes
0 answers

Restrict specific IPs using Virtual Host in Apache

I need to control few 100+ Ips using Apache’s Virtual Host. I have tag inside tag with below config. … AllowOverride None Require all granted .. Can anyone tell how to mention all 100 IPs in Directory tag?
Mario R
  • 171
  • 6
0
votes
1 answer

Why isn't my apache httpd server serving content from my VirtualHost

I have an apache httpd server running on a linux server. The server's fqdn is www.example.com, but I have a dns alias of www.example2.com for the same server. When I access the server using my browser and use http://www.example.com it serves the…
dnraikes
  • 275
  • 1
  • 4
  • 14
0
votes
0 answers

Include PHP script from sveltekit according to environment variables

I have a basic index.php page that on its turn includes a PHP file containing some variables in a JSON structure. The path of that PHP file is set via environment variables set in the virtualhost file. index.php: ... include…
Marc
  • 1,029
  • 1
  • 10
  • 27
0
votes
0 answers

how to setup apache to serve two domains with wildfly applications

I'm trying to setup following scenario: 1 apache webserver 1 wildfly application server 2 apache virtual hosts ( first.com, second.com) both domains (first.com, second.com) have DNS A Records pointing to apache's ip address each virtual host should…
dkalna
  • 55
  • 3
0
votes
1 answer

Apache RewriteCond not working for static files

I have two copies of the website in separate directories for different languages (Spanish and English) and the directory structure is as follows + /var/www/website |- es |- en The es directory serves the Spanish version of the website and en…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

Laravel on docker runs but can not CURL to its container

My laravel project runs on docker, and I can browse the project with http://localhost:8000. But when it comes to sending a request to the API of this project (API and Website are in the same project and container named web_master), I get this…
0
votes
0 answers

How to redirect calls from my-domain/api/specific-route to my-domain/api/api/specific-route?

I have a site being served by an Apache server, with the following structure: On the main directory, I have a front-end app. On a subdirectory named API, I have an API running on Laravel. When I make calls to the API the URL look like this:…
Ezequias Lopes
  • 129
  • 1
  • 11
0
votes
0 answers

Apache Virtualhosts shows default page (Windows 11)

I've installed apache (and php etc) via chocolatey but after enabling my VirtualHosts, requests to it still shows the default site. Here's what I did step by step: First I uncommented the line here in httpd.conf: # Virtual hosts Include…
Petter Thowsen
  • 463
  • 1
  • 6
  • 16
0
votes
1 answer

Setting up LAMP on VPS, virtual host not working

Trying to set up a sample site on a VPS with LAMP. Accessing the site via IP address loads it fine, but I'd like to make it work with the URL "mysite.dev". However when I go to http://mysite.dev in Chrome, I get "This site can’t be reached. …
Alan P.
  • 2,898
  • 6
  • 28
  • 52
0
votes
0 answers

Stop redirect to root when accessing location block for a folder outside server root in nginx

I am running a web client for a mapping service and the app resides in a folder called prod. I have copied prod to var/www/html/. This is my sites-enabled conf for a Laravel app I have running already. I have added a location block for the prod…
watkib
  • 347
  • 3
  • 11
  • 25
1 2 3
99
100