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
1
vote
0 answers

Apache named vhost not catching requests that should go to it

I have an Apache server with a group of name-based virtual hosts on it. Requests are sent to the server via an Apache reverse proxy, which forwards all requests for these site names to port 80 on the backend server. While most of these sites appear…
Johansensen
  • 371
  • 1
  • 12
1
vote
1 answer

Apache redirect to HTTPS when supported by browser

How to I automatically redirect all non secure (http) pages to their https counterpart http://example.com -> https://example.com But only do this for browsers which support https. So that my website still works in older browsers?
nathnolt
  • 435
  • 6
  • 8
1
vote
0 answers

WordPress and cURL seeing different Host headers

I'm having trouble setting up a reverse proxy environment so that WordPress is accessible from https://www.example.com/blog (.net server) which delegates the processing of the request to https://blog.example.com (running apache). I believe…
ajbeaven
  • 9,265
  • 13
  • 76
  • 121
1
vote
1 answer

How to access multiple apps/websites on single aws lightsail instance through localhost via ssh tunneling?

I have configured my instance to serve 5-6 apps on different domains using vhosts. I want to access those apps using SSH tunneling using local port forwarding to make some modifications. This is required due to security concerns and i don't want to…
Rohit
  • 11
  • 3
1
vote
1 answer

How to redirect requests to subdirectory url to root in Apache httpd?

I have Apache httpd server running in my Linux box with SSL enabled using LetsEncrypt. The root directory of html files is /var/www/html. Let me show the structure of /var/www/html below; -html |_ index.php |_ file1.php |_ dir1 | |_…
Alfred
  • 21,058
  • 61
  • 167
  • 249
1
vote
1 answer

apache default ssl page

I have an apache website running under a specific domain with a ssl vhost activated. All works finde. If you connect to http://ip then you get the apache forbidden page, which is also fine. But if I visit https://ip I do not get get that forbidden…
Flo Espen
  • 450
  • 4
  • 10
1
vote
2 answers

Error 404 being given on a virtaul host with custom .htaccess file

I have an apache2 installation on my local linux server. It has a virtual host called pcts.local which has the root /var/www/repos/pcts/. Inside the root of pcts.local is a .htaccess file which attempts to rewrite urls to include .php if it isn't…
Cobain Ambrose
  • 91
  • 1
  • 1
  • 8
1
vote
0 answers

Adding CGI directives to vhost causes 404 / Not found error

I am trying to run two php versions with apache. One (PHP7) is setup with mod and the other (PHP8) I am trying to set up with CGI. I am currently testing both work using the different vhosts for https and http. I have the following virtual hosts in…
Mat
  • 11
  • 2
1
vote
1 answer

Problem with Symfony 5 in prod but not dev

I have a problem with my project in symfony 5.4 (recently update from 4.4) I deploy my project on the prod server (on a subdomain) and he don't work in prod environnement, but work in dev. I already : _ fix permissions for /var folder _ set up…
Appheros
  • 29
  • 4
1
vote
2 answers

vhost config in cyberpanel is not working

There is vhost config, which should be reverse proxy to the flask application, and is not working. Below is the vhost config. Flask application is running on port 5000. Added rewrite in both the context and outside, even then it's not working. Below…
1
vote
0 answers

Basic auth only for specific directory

I have a small envirnment where I have 3 services on one server and I want to put all three behind a reverse proxy. Prometheus server running on port 9090 Prometheus Alert manager running on port 9093 Grafana running on port 3000 My current…
AsterOps
  • 11
  • 3
1
vote
1 answer

Apache Rewrite, then Proxy, which order?

I know it should be pretty easy to use mod-rewrite and mod-proxy for a Vhost. But I cannot get the right order. Here is what I want to achieve: Files (JS, CSS, images, fonts, etc.) should be delivered normally XHR requests for certain path…
BairDev
  • 2,865
  • 4
  • 27
  • 50
1
vote
1 answer

URL based request headers in Akamai

I have a requirement where I need to have separate vhosts file in apache for same domain and different path. The reason behind separate vhosts is something for business use case. All I want to know is that for different URL what kind of settings can…
1
vote
0 answers

https domain is redirect to https://localhost using vhost xampp in Mac

When try to open https://blog.r3ciprocity.com it redirect to https://localhost I don't know what configuration I missed. Here is my configuration file #httpd-vhosts.conf ServerName localhost ServerAlias localhost …
1
vote
2 answers

PhpMyAdmin and Suhosin set options for Suhosin.

I am having a problem with Suhosin and PhpMyAdmin on the same server. When reading the docs: phpmyadmin.net is states that I should overrite the settings for phpmyadmin eg "suhosin.request.max_vars". Where would I put this? In my…
John Magnolia
  • 16,769
  • 36
  • 159
  • 270