Questions tagged [virtualhost]

Questions relating to virtual hosting; that is, serving content for multiple logically-separate entities from the same machine. Usually relates to name-based virtual hosting in the web server, but can also cover other protocols such as SMTP or IMAP.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

NGINX - redirect userdir to another domain

I had an apache virtualhost config that redirects "http://host.domain.com/~userdir" to another host: RewriteRule ^/~(.+) http://anotherhost.domain.com/~$1 [R,L] But I'm having trouble ...
0 votes
1 answer
27 views

Apache2 subdomain not found after addition

Here is a situation I have example.com domain pointed to my server where Apache2 runs. Currently I have two confs (one for HTTP and one for HTTPS) that accepts example.com requests and shows page ...
  • 101
1 vote
1 answer
35 views

ErrorDocs | VirtualHost | Apache 2.2.x

So, I'm having a challenge trying to get my virtual hosts (in the example, called bozo) to 'point' at the right error documents for 401, 403,... errors. I am trying the following construct, but it ...
0 votes
1 answer
20 views

Does SuexecUserGroup work with Virtualhost in Apache 2.4

I'm trying to set up a virtualhost that uses CGI scripts that run as a particular user and group. I'm using the SuexecUserGroup directive, but that doesn't seem to work. Basic setup. User "Bob&...
0 votes
0 answers
16 views

why am I getting postfix loops back to myself error, BUT, only after I point the subdomain to the server?

so I have set up a new web server that is hosted in the cloud. The server is ubuntu, I am currently transferring 1 site (with 2 subdomains) to this new server. I transferred 1 site so far, lets say ...
0 votes
1 answer
45 views

Apache vHosts - Two domains, multiple subdomains and defaults possible?

after searching and try-and-erroring for a while I came to the conclusion that my problem is a bit too special for google :-) I have 2 domains and multiple subs example.org cloud.example.org wiki....
0 votes
1 answer
45 views

After update from Apache 2.2 to 2.4, Aliases no longer work

I'm not a stranger to server configuration but on my local development systems (all of them), some update seems to have broken the Web sites' aliases as none work now. I'm not sure when it happened as ...
  • 101
1 vote
1 answer
83 views

Apache 2.4 VHosts with FastCGI and suexec-custom

I have setup at my local machine Ubuntu 22.04 Apache 2.4 with suexec-custom. In fact, this setup was working from Ubuntu 16 up to this update to 22.04. I only load some modules, reload some other and ...
  • 421
0 votes
1 answer
30 views

Apache2 VHOST matches wrong server name

I'm running Apache 2.4.54 on Debian Bullseye and have 42 VHOSTs configured. Most of them are subdomains xxx.my.domain.com of our main domain, say my.domain.com. One client has a special domain. There ...
0 votes
0 answers
17 views

Block all IP's except HOME IP in Nginx Netdata virtual host file on Ubuntu Server 20.04

I'm running Ubuntu Server 20.04, and have successfully set up netdata. My netdata's Nginx virtual host file looks like this: upstream backend { server 127.0.0.1:19999; keepalive 64; } server { ...
  • 73
0 votes
1 answer
29 views

Apache httpd on a backup machine where hostname is not matching

I have to run an Apache httpd server on a backup machine, which is a CentOS. In this case, it is a WordPress multisite installation. Since it is a backup machine, the DNS server does not point to the ...
0 votes
1 answer
23 views

Drop all connections from other domain except from original domain on Apache 2.4

I have ubuntu server with apache 2.4 web server and original domain is running with ssl. Someone pointed their domain to my server and in my virtual host, it specify there the servername and ...
0 votes
0 answers
20 views

Redirection of only home page to 404 not working

What is needed is that https://cpc.dev.company.eu should redirected to 404 page, and all other like https://cpc.dev.company.eu/* and app1.dev.company.eu & app1.dev.company.eu/* should work as it ...
0 votes
1 answer
162 views

Apache virtualhost port 443 serves content from port 80 configuration

I'm running Apache 2.4.52 on Ubuntu Server 22.04. I'm trying to run https through port 443, eventually aiming to have a redirect from port 80 to force content on https. However, Apache seems to be ...
  • 21
0 votes
0 answers
53 views

Cannot get HomeBrew Apache/2.4.54 Virtual Hosts to listen on all Network Interfaces

I have tried to configure Apache virtual hosts to respond to connections on all of my network interfaces (external, private, loopback) on port 8080, but to no luck. Here's what I have done so far on ...
0 votes
0 answers
278 views

Magento 2 running on Ubuntu 20.04 with Nginx returns Bad Gateway Error code 502

I have a fresh install of Magento 2.4.4-p2 on Ubuntu 20.04. The PHP version is 8.1.13 and the nginx version is 1.18.0 (Ubuntu). I can see and access the home page and the following pages without 502 ...
  • 123
1 vote
0 answers
136 views

Apache 2.4 "Require ip" not working for /server-status, /phpMyAdmin etc with VirtualHost directives added in httpd.conf

I recently changed using the Event MPM in my Apache 2.4 installation, alongside PHP-FPM and FastCGI proxy, I hope that wasn't the reason for my problem. I also started working with name-based ...
  • 77
0 votes
0 answers
61 views

OHS ProxyPass returning a 403

I've setup an OHS server (managed by me) to be used to proxy requests to another server (not managed by me). As of right now, the relevant part of the OHS server's virtual_hosts.conf looks like this: &...
  • 45
0 votes
1 answer
55 views

Apache2 how to generate random string for subdomain

I want to issue a redirect to a new randomly generated subdomain name for every request I get. Below you can find my vhost configuration. I want to do a redirect towards a subdomain containing some ...
  • 131
0 votes
0 answers
19 views

Apache ReverseProxy keeps redirecting to another virtual hosts

I have apache as a reverse proxy for Webmin (port 10000) backend. Both are on the same server. Here's my config file: <VirtualHost *:*> ProxyPreserveHost On ServerName srvadm.****.com ...
  • 103
0 votes
2 answers
43 views

Apache VirtualHost - per user ProxyPass

I'm trying to configure Apache to redirect users to different paths based on their authentication credentials (using htpasswd). I've managed to set up ProxyPass, which enables the redirection of the ...
  • 1
0 votes
1 answer
20 views

How to make site map file public on site secured by shibboleth

We use shibboleth to secure an apache virtualhost. We would like to make single file (a site map) available publicly for this site. Is there way to code this in the virtualhost? The current virtual ...
0 votes
0 answers
91 views

How to redirect subdomain in apache virtualhost (CentOS8)?

I have an apache virtual host for the main domain and subdomain as below. <VirtualHost *:80> ServerName example.com DocumentRoot /var/www/html/example/public <Directory /var/www/html/...
0 votes
0 answers
31 views

How to make redirect rewrite rule for https subdomain on apache (CentOS8)?

I have own domain for example. https://example.com Below is my apache virtual host with 301 redirect rewrite rule. <VirtualHost *:80> ServerName example.com DocumentRoot /var/www/html/...
0 votes
1 answer
45 views

Configuring Virtual Hosting Httpd - Fedora Server - 'sites-available and sites-enabled' vs 'conf.d/vhost.conf'

The current set-up for my web server is a 1GB nanode using Fedora37 as the distribution for the compute instance. For the web server I am using Httpd (Apache 2.4.54), and am now in the process of ...
0 votes
2 answers
54 views

ProxyPass not working alongside ProxyPassMatch

So at the moment I have a virtual host configured on my Oracle HTTP Server instance with a ProxyPass as such: ProxyPass ^/test/home/ https://example.com/ ProxyPassMatch ^/test/home/(.*)$ https://...
  • 45
0 votes
1 answer
62 views

How do I add a second virtual host to an Apache server config?

I have an Apache server running on an AWS EC2 instance. Currently, one virtual host is running successfully on the server, and I want to add a second virtual host / domain, but I can't figure out how ...
0 votes
0 answers
14 views

HTTPS Redirect Not Allowing Access On Port 443 (Apache2, letsencrypt)

ERR_CONNECTION_TIMED_OUT ...is what I'm getting trying to access my domain wget (website), VH config, netstat, ufw status The issue lies somewhere between sending the request to apache through 443 and ...
  • 1
0 votes
1 answer
93 views

How to install memcashed on a LAMP stack with PHP FPM?

I have a LAMP stack with PHP FPM and multiple virtual hosts with Wordpress sites on. I have tried to install memcashed using this tutorial. In Wordpress sitehealth I get: "You should use a ...
0 votes
1 answer
562 views

Cloudflare Tunnel without having to also use noTLSVerify?

I’ve got a simple domain setup on an Ubuntu server running Apache (literally just displays a static HTML file); I set it up with LetsEncrypt and it was working without issue. I wanted a bit more ...
0 votes
0 answers
23 views

How do you set up multiple virtualhosts on apache2 using only the server ip and server alias?

I'm trying to set up apache with multiple virtual hosts "filebrowser.com" and "videos.com" however, I'm only able to access filebrowser.com and not videos.com. I also have to enter ...
0 votes
1 answer
26 views

Having Trouble setting up 2 Virtual Hosts with SSL

Im trying to setup a second webserver on my machine however im running into problems with the virtual hosts and im not sure which file and what i should be changing. I have 1 server running with SSL ...
0 votes
0 answers
34 views

(Solved) Apache 2.4 multiple subdomain with fallback folder

I want to have a default folder when the folder does not exist in the VirtualDocumentRoot, I have this code: <VirtualHost *:80> ServerAlias *.development UseCanonicalName Off ...
1 vote
1 answer
29 views

How to create alias to url in Apache 2

I have main url like http://apps1.example.com and i want create alias like http://apps1.example.com/svc-base in my vhost config <VirtualHost *:80> ServerName apps1.example.com ...
  • 11
0 votes
1 answer
61 views

apache virtualhost not taked into account

I have multiple domains and i have imagined that one VirtualHost for each would be the way to go. glpi.localnet.lan is never loaded, whereas web.localnet.lan is always display instead, even if i tip &...
  • 2,233
0 votes
0 answers
35 views

How do I properly remove a staging subdomain that's no longer needed?

I have a WordPress Multisite configuration on an Apache/2.4.46 (Ubuntu) server. I make staging sites using a subdomain of the main domain, then when that staging site is ready to be 'live' and uses ...
  • 101
0 votes
0 answers
65 views

404 errors with Virtual Host in VPS Server

I'm trying to create a virtual host in my vps server but I'm receiving "HTTP Status 404 - Not found". My Virtual Host: vi /etc/httpd/conf.d/demonstracao.itcmedbr.com.conf <VirtualHost *:...
0 votes
0 answers
22 views

Apache vhost doesn't work

What is wrong with this? The .conf file is added via puppet in /etc/apcahe2/sites-enabled but it doesn't get enabled and i cannot open the link abc.xyz-software.com/apis/1 ....it throws 404 error. <...
  • 21
0 votes
0 answers
26 views

Apache HTTP/2 Issues on Virtual Hosts

I have third-party domains pointed to my IP address using A records, and these are configured on the server using a Virtual Host configuration. Here's an example: Protocols h2 h2c http/1.1 <...
  • 101
0 votes
0 answers
27 views

create a virtual host with name

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 ///...
  • 21
0 votes
1 answer
176 views

Apache virtual host not catching all requests

I have 80 port requests redirected to 443 like this <VirtualHost *:80> ServerName example.com ServerAlias www.example.com mail.example.com Redirect permanent / https://example.com/ &...
  • 115
-1 votes
1 answer
476 views

Match VirtualHost by X-Forwarded-Host header

I am using apache 2.4 and would like to create multiple vhosts. The vhosts should be matched based on the X-Forwarded-Host header, instead of the Host header. Unfortunatly I could not find anything in ...
  • 101
0 votes
0 answers
164 views

Apache2 Virtual Host. http to https. Too many redirects

I've created a new virtual host in Apache 2.4.29. I want to redirect http traffic to https. Accessing the url gives an error www.example.com redirected you too many times. If I comment out the ...
  • 11
1 vote
1 answer
95 views

Nmap - Print names from virtual hosts

I'm trying to identify virtual hosts with Nmap, command: nmap --script http-vhosts -p80 {ip} Nmap identifies a number of hosts. But how do I get the actual host names that are found? Now nmap only ...
  • 11
0 votes
0 answers
159 views

Deploy VueJS and CodeIgniter applications under same virtualhost/hostname

I've a Windows Server VM in LAN named "testingserver" I've installed Xampp (Apache, PHP) to serve both, a VueJS 2 and CodeIgniter 4 apps Folder structure d - ciapp (CodeIgniter) d - dist d - ...
0 votes
1 answer
22 views

How to create a local host that can be accessed through everyone on the same internet?

I've had an Apache Virtual Host working for a couple of month where workers on the office wifi could type in something like www.XYZ123.com and was able to access the website through their browser. Now,...
0 votes
1 answer
232 views

Can't load Web API with SSL (ERR_SSL_PROTOCOL_ERROR)

So I can't get my head around this problem, and looked everywhere on the internet but did not found any working solution. 1.1. I have an apache server running as virtual host. In the initial situation,...
  • 1
1 vote
1 answer
119 views

Postfix wildcard, virtual_alias, and recipient_delimiter forwarding glitch

Using Postfix with an MySQL backend, have a group of aliases set up, including domain aliases. Using '.' as recipient_delimiter, and have propagate_unmatched_extensions = canonical, virtual, alias. ...
0 votes
1 answer
400 views

Apache virtual host serving incorrect index.html file for one of two domains connected to server

I have two domains setup on a single server using Apache Virtual Hosts. The first domain (domainA.com) is loading the index.html file of the second domain (domainB.com), even though the first domain (...
0 votes
0 answers
49 views

Allowing file types in specific folder apache2 vhost file

I've an apache2 virtual host file, which has several sites in it (yes I know.. a single file, work with me here). Before any of the VirtualHost stuff I've specified some directory and file rules like ...

1
2 3 4 5
55