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
65 views

How to block some bots in .htaccess but except access robots.txt?

I've blocked some bad bots using .htaccess. For example: SetEnvIfNoCase User-Agent "^bot1" bots SetEnvIfNoCase User-Agent "^bot2" bots SetEnvIfNoCase User-Agent "^bot3" ...
usr12's user avatar
  • 1
0 votes
0 answers
35 views

Nginx serves wrong DocumentRoot

I have an NGINX reverse proxy with Apache running on Linux22. My goal is to serve a file in a new documentroot, but for whatever, the Nginx Default conf serves the old apache2 index file. The ...
IHateCoding's user avatar
-1 votes
0 answers
93 views

Moving a virtual host domain to a subdomain without changing configs

My client is more-or-less being extorted by the company that originally developed their website and webshop. Because of this, my client wants to develop a new website that is hosted somewhere within ...
brent_rb's user avatar
0 votes
0 answers
28 views

My openlitespeed virtual host external app does not run as required user

I'm trying to setup OpenLiteSpeed, and I want PHP to run as a certain user and a certain group in a certain virtual host. I've turned the entire knowledge base upside down, especially this section ...
Guido Goluke's user avatar
0 votes
1 answer
26 views

Apache ignores second virtual host

we are using Apache on an Ubuntu server to host our websites. SSL Certificates are provided be LetsEncrypt and everything worked fine for the last years. Last friday I tried to renew one of the ...
Klaus Friese's user avatar
0 votes
0 answers
78 views

What would cause virtual hosts to use the same version of php-fpm after adding distinct fpm handlers?

As soon as I enable php8.1-fpm.conf, all my sites switch from using php7.4-fpm to php8.1-fpm. All my vhost files have fpm handlers added to the <VirtualHost *:80> blocks like <VirtualHost *:...
Steve's user avatar
  • 101
0 votes
0 answers
30 views

Placement of HTTP Headers in VirtualHost Containers?

Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" Header always set X-XSS-Protection "1; mode=block" Header always set X-Content-Type-...
Kejatz's user avatar
  • 1
0 votes
0 answers
22 views

Virtual host configuration not working

I'm trying to move for the first time a website to a dedicated server running on debian. I created a file called mywebsite.com.conf in /etc/apache2/sites-available Here's the file : <IfModule ...
Mathias Paicheler's user avatar
0 votes
1 answer
175 views

Hosting Laravel Filament apache server responded with a MIME type of ""

I been trying to host my laravel filament project into my server using apache but upon deployment i met 2 problem i never seen before pic related Failed to load module script: Expected a JavaScript ...
Gagas Amukti's user avatar
0 votes
0 answers
198 views

Set up proxy for Nextjs and WordPress blog

Thanks in advance. I am new to server setup. So pardon me If I used the wrong words. I am setting up an Ubuntu server to host Nextjs and WordPress blog on the same server. I have to set up Nextjs on ...
Sandeep Solanki's user avatar
0 votes
1 answer
136 views

php-fpm creats only one socket file

I have multiple virtual hosts with unique domain names, users, and root directories for each on Nginx and php8.1-fpm. In the /etc/php/8.1/fpm/pool.d/domain.com.conf contains user = domainuser group = ...
Dev Guy's user avatar
  • 127
0 votes
1 answer
121 views

Postfix: Different TLS certificates for each hosted virtual mail domain

I have a single machine with a single Postfix instance which hosts different virtual mail domains. Is it possible to configure Postfix such that is uses different TLS server certificates (with ...
user2690527's user avatar
0 votes
1 answer
30 views

Host with online server(Linux)

I purchased a server with ubuntu server. Is it possible to create virtualhosts and connect them to a public domain to browse them? Thank you, Best regards,
user avatar
1 vote
1 answer
73 views

Apache AliasMatch with Multiple Subdomains

I have the following virtual hosts: <VirtualHost *:443> ServerName article.example.com AliasMatch "^/(.*)" "/var/www/html/article.php" </VirtualHost> <...
Maciek's user avatar
  • 139
0 votes
0 answers
143 views

Apache2 with Virtualhosts and Cloudflare are not working

I have a Debian 11 Server with one public IPv4 Address and One Domain. The subdomain mail is defined in a virtual host with a reverse proxy for mailcow. The subdomain mail is also the reverse DNS for ...
M. Loe's user avatar
  • 1
0 votes
0 answers
45 views

Show content of loaded sites-available in apache2 under ubuntu 18

I accidentally deleted a .conf in /etc/apache2/sites-available. Is there a way to retrieve the content of it? When I type a2query -s, I see that the deleted .conf is still loaded, since I did not ...
Selphiron's user avatar
  • 101
0 votes
2 answers
81 views

Apache virtualhosts conf let wrong servername requests going through proxy

I have moved a server configuration to a new server and at the same time configured it with apache mod_proxy to access a gunicorn/django webserver (inside a docker container on port 8000). Previous ...
yo_e-h's user avatar
  • 3
0 votes
0 answers
40 views

Apache with vhosts: Newly created site opens other site

I have a server with three vhosts, the default (domain.com), site1.com and site2.com. The server is running Ubuntu 22.04 LTS with Apache2. Until yesterday, this server only served the default domain, ...
Emily's user avatar
  • 1
0 votes
0 answers
990 views

configuring content-security-policy for apache virtual hosts

I have Apache 2.4 with these sites configured in the httpd-vhosts.conf file: <VirtualHost *:80 *:8080 *:8084> DocumentRoot "c:\apache_php\sites\public" ServerName www.mydomain....
raphael75's user avatar
  • 133
2 votes
1 answer
995 views

Why is my Apache Virtual Hosts configuration not working correctly?

Background I have been using an Apache server with only one site and this has been working really well. My working single-site config is at the bottom of the question. Recently, I have had to create ...
GeorgeCiesinski's user avatar
0 votes
0 answers
20 views

DNS/Domain not working [duplicate]

I have domain, pointed to my VPS. I made VH in apache to serve simple index.htm file to check if everything works fine. Unfortunatelly something is wrong because page is not found(http://zoofi.me). ...
michal's user avatar
  • 101
0 votes
1 answer
242 views

Apache VirtualHost Same domain for Front and API

I have a multi-tenant application that is resolved using subdomains with the pattern *.localhost. The front-end of the application is accessible at http://localhost:3000/. To achieve the desired ...
Gogo's user avatar
  • 101
0 votes
0 answers
13 views

How can I add the (virtual) ServerName value as customer Header in Apache2?

I would like to get the ServerName on the HTTP response of Apache in a custom header. Something like this: Header Set X-VirtualServerName "%{SERVERNAME}" Please consider this string can be ...
Tobia's user avatar
  • 1,322
0 votes
1 answer
1k views

How to get access virtual servers from host machine by domain?

I have virtual machine Ubuntu on Windows host machine. On VM there is nginx server with virtual server site.com. VM IP is 127.0.1.1. In VM I edit /etc/hosts: 127.0.1.1 site.com www.site.com And now I ...
m1know's user avatar
  • 1
0 votes
1 answer
276 views

Bring website online with domain without adding the port

I come to you because currently I have a website that is hosted on my web server. But on this server I have several websites hosted on it. So to access it you have to put a port number. Until then it'...
Erwan LAUNAY's user avatar
0 votes
1 answer
875 views

How to make my website SSL secure with Ubuntu 22.04.2 LTS server and Apache

I'm trying to access my website through https://. but all my efforts are in vain. First I will explain how I did everything to get into the context. The server hardware is a Raspberry PI2B. With ...
AlbertoRS's user avatar
-1 votes
2 answers
95 views

Wildcard sub-domain apache vhost doesn't load my website folder

I'm having some issues getting my apache virtual host to load the correct folder on my server. I'm building a public status pages feature for my platform, and one feature is allowing users to specify ...
Ryan H's user avatar
  • 99
0 votes
1 answer
634 views

Apache not working with NameVirtualHost config

I have a fresh apache setup(Apache/2.4.57 (Unix)) and am struggling with the namevirtualhost config. If I run apachectl -S the output is missing the usual IPADDRESS:80 is a NameVirtualHost I ...
roediGERhard's user avatar
0 votes
0 answers
41 views

Restrict location to just one IP in vhosts not working

I am trying to restrict the access to a specific location for just one IP address in the vhosts file but for some reason it is not working. This for apache 2.4.29. Here is my vhosts file: <IfModule ...
BradG's user avatar
  • 101
0 votes
0 answers
41 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 ...
Eder Andrade's user avatar
0 votes
1 answer
93 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 ...
Johnczek's user avatar
  • 111
1 vote
1 answer
55 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 ...
Johnny Canuck's user avatar
0 votes
1 answer
290 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&...
Scott Anderson's user avatar
0 votes
0 answers
35 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 ...
Collin Short's user avatar
0 votes
1 answer
185 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....
edwarddeath's user avatar
0 votes
1 answer
289 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 ...
DonP's user avatar
  • 101
1 vote
1 answer
605 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 ...
centurian's user avatar
  • 461
0 votes
1 answer
68 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 ...
Powerriegel's user avatar
0 votes
1 answer
60 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 ...
rexkogitans's user avatar
0 votes
1 answer
44 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 ...
Juliver Galleto's user avatar
0 votes
1 answer
2k 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 ...
Sit399's user avatar
  • 21
0 votes
0 answers
785 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 ...
Abe's user avatar
  • 123
1 vote
0 answers
366 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 ...
AkiEru's user avatar
  • 77
0 votes
1 answer
286 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 ...
Mnemosyne's user avatar
  • 131
0 votes
2 answers
58 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 ...
b0d's user avatar
  • 1
0 votes
1 answer
34 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 ...
Steve Vaughn's user avatar
0 votes
0 answers
86 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/...
joenpc npcsolution's user avatar
0 votes
1 answer
238 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 ...
CatByte-io's user avatar
0 votes
2 answers
210 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://...
Ress's user avatar
  • 45
0 votes
1 answer
231 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 ...
HartleySan's user avatar

1
2 3 4 5
56