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
1 vote
2 answers
766 views

New virtual host on apache returns the default vhost, other times returns the normal content

I'm having some really strange behaviour on one of my Debian servers. When requesting stuff.com ( example ) or stuff.com/image.jpg, let's say 50% of the times I have the correct response, the other 50%...
Tio's user avatar
  • 165
1 vote
0 answers
617 views

Redirect Permanent in Virtual Host apache configuration behaving not as expected

I have multiple domains pointing to the same IP. RedirectPermanent works fine for all domains IF and only IF the pages are NOT existing, and I get the 404 default page of my website. If I type in the ...
giulio rdcom's user avatar
0 votes
1 answer
247 views

Web app on a VPS. How to make it appear on a subdomain?

I'm using a personal VPS (Ubuntu 20, Apache2) to host a web app. Currently there are 2 static sites, site1.com and site2.org, both working. I installed an app that is currently available on port 8065, ...
nivek's user avatar
  • 103
0 votes
1 answer
49 views

Virtualhost1 SSL affecting Virtualhost2 Aliase SSL

i am loading the SSL files for my wildcard subdomains from Virtualhost, but the second virtual host loads the ssl file of the first virtualhost, and the browser reports Invalid certificate error Heres ...
Manuel E's user avatar
0 votes
1 answer
715 views

Apache to serve both static file and webapp

I have apache running on below reverse proxy config to serve java webapp content <VirtualHost *:80> SSLProxyEngine on ProxyPreserveHost On ProxyRequests Off ServerName www.example.com ...
madprinciple's user avatar
1 vote
2 answers
996 views

How does Apache choose which certificate to use?

Currently Apache is hosting several sub domains with host certificates generated with certbot and a http challenge. Now I want to setup a default virtual ssl host to redirect non-existing subdomains ...
Jette's user avatar
  • 113
1 vote
0 answers
1k views

Apache, Ubuntu multiple ports or subdomains with SSL reverse proxy to different ports same server

I'm struggling with something here. I have an Ubuntu 18.04 VM in azure + Apache2 installed. I have a domain (example.com) pointing to my VM's web server /var/www/ and recently secured the server ...
bikeactuary's user avatar
0 votes
1 answer
628 views

Apache serves Subdomain instead of Domain

I had two sites up and running on my server(nextcloud.example.com(Nextcloud Instance) & example.com (Grav Instance)). I added a Postfix configuration on the server and now I'm also able to send ...
Lukas's user avatar
  • 3
2 votes
1 answer
46 views

How to create redirection from two domains in one VirtualHost directive in Apache?

I want users visiting either of napiwki.kontestacja.com and napiwek.kontestacja.com to be redirected to the same address. I'm using the following fragment in httpd.conf: <VirtualHost *> ...
ByteEater's user avatar
  • 133
4 votes
2 answers
307 views

How does SAN provides block access to data?

I was reading about file storage and that lead me to SAN. I read about SAN and that it provides block access to data. I was looking for these concepts in some video, where the guy creates a VM on some ...
rahul sharma's user avatar
0 votes
0 answers
222 views

Domain shows wrong site in nginx, but only for HTTP

I have multiple sites configured in Nginx 1.14.2-2+deb10u3 on Debian 10. One is a.mydomain.com, another one is b.mydomain.com. Both domains have two server blocks each, for port 80 and for port 443. ...
Martin's user avatar
  • 1
0 votes
2 answers
169 views

apache2 - How to allow unencrypted access only to local network?

I have a Linux server on my local network with a few services running. I want to be able to access that server by my domain's name with encryption, but leaving LAN access free. I tried searching for ...
adamski234's user avatar
0 votes
0 answers
5k views

Xampp redirect configured vhost to dashboard

I have XAMPP long time and i am using Apache for PHP websites. I have 5 configured vhosts, projects in same parent directory, with same vhost confing and dns setting. But my last configured vhost, ...
Lajdák Marek's user avatar
0 votes
2 answers
523 views

Apache crash if I try to use ProxyPass on localhost to expose different services as subdomain

I have the following directory structure for multiple websites and services /var/www/html/site1 /var/www/html/site2 /var/www/html/site3 /var/www/html/serv1 /var/www/html/serv2 site1 folder hosts a ...
AndreaF's user avatar
  • 225
3 votes
1 answer
287 views

Apache shows general root index rather than DocumentRoot index configured with Virtual Host in Debian

I have multiple websites supposed to run each with its own domain (e.g. site1.com, differentsite2.com, othersite3.com etc.). The operative directories of each website are dedicated subfolder in /var/...
AndreaF's user avatar
  • 225
0 votes
1 answer
80 views

nginx and wordpress - site2.com need to load content of of site1.com/site2 without url change

I have 1st domain name site1.com - self-hosted wordpress and contains posts and pages. (everything good, no issue at all) I have 2nd domain name site2.com - nothing hosted (dns pointing to same server ...
Gineesh's user avatar
  • 181
2 votes
1 answer
2k views

Apache virtualhost is redirecting to the wrong virtualhost

I am trying to implement a second domain within an existing digitalocean droplet. Because I'm on DO, I followed the answer by ryanpq on this thread: https://www.digitalocean.com/community/questions/is-...
Jay Jung's user avatar
  • 121
0 votes
1 answer
5k views

apache 2.4 config to allow ELB health check

I have an EC2 instance behind an AWS Application Load Balancer, running apache 2.4 The health check is configured to do a GET on /health/ I have virtual hosts configured, and two vhost entries - one ...
chris's user avatar
  • 4,003
0 votes
0 answers
375 views

Apache VirtualHost redirection issue - redirects to default

I'm having trouble with my apache config. Several sites are hosted on the server, each connected to a domain. Here's an excerpt from the config: <VirtualHost *:80> ServerName [name].com ...
thisaintme's user avatar
0 votes
2 answers
414 views

How to redirect http to https while the other folder stays http?

I have 2 folders, CRM and my_website. The my_website can be access to https://example.com/ (it will change http to https), while the CRM is http://example.com/crm. and this is my virtual host 000-...
Storm Spirit's user avatar
0 votes
0 answers
56 views

How to prevent access to my website by IP?

I read in other similar questions that I cannot prevent access by IP. I have an apache server that serves several Virtual Hosts, but unfortunately every time I access by IP it redirects me to the ...
Diesan Romero's user avatar
1 vote
0 answers
73 views

Certificate warning before URL Rewrite for Second domain in Apache 2.4

I am receiving certificate warning on browser before redirecting second domain to page of first primary site domain. Redirect is working after If clicked on Advanced. Same happening with chrome and ...
ronypatil's user avatar
0 votes
1 answer
822 views

Ngnix Closes The Connection Doesn't Return 301

struggling to get my hosts to work on port 80/HTTP and redirect to HTTPS. Discovered this when I gave out a URL and they said it didn't work but noticed a direct link to the site did work. I've done ...
John Lamar's user avatar
0 votes
1 answer
940 views

Migrate vhosts from Apache to OpenLiteSpeed

I was under the impression from reading the LiteSpeed web server doc, that LiteSpeed was using the same syntax for vhosts config than Apache ones, thus the migration was easy. However, after ...
bolino's user avatar
  • 275
2 votes
1 answer
4k views

error : virPidFileAcquirePath:422 : Failed to acquire pid file '/run/user/1000/libvirt/libvirtd.pid': Resource temporarily unavailable

Anyone have any ideas how to fix this? It looks like the computer is telling me libvirt has no VM to connect to. I could be off the mark there. I am starting to play with vitrd. I am thinking of ...
mister mcdoogle's user avatar
0 votes
1 answer
445 views

Nginx how avoid location for subfolders?

I have several subfolders in a project in which of them I have a index.html files. I prefer to call the index.html something like "gallery.html" I tried location gallery { index gallery....
Ponzio Pilato's user avatar
1 vote
1 answer
1k views

Apache VHost redirect aliases to HTTPS

I'm trying to do Virtualhosts on my "playground" VPS. I need it to redirect 3 or more domains to the main one. Also it should redirect HTTPS, Lets Encrypt is configured and working well. In ...
sjiamnocna's user avatar
0 votes
1 answer
105 views

Redirect subdomain to different IP/folder

I was trying to redirect a subdomain ie billings.example.net to 1.2.3.4/billing. Well, from my experience I could access the 1.2.3.4 server and create a vhost pointing that the incoming of billings....
MD Nasirul Islam's user avatar
1 vote
1 answer
1k views

nginx serving wrong certificate for vitual hosts with own conf file

I've got a few virtual hosts set up through nginx on my centos7 server. I'm getting certs by using letsencrypt certbot. By default certbot writes the vhost info to the /etc/nginx/nginx.conf file. This ...
LoneWolfPR's user avatar
1 vote
1 answer
715 views

How to add multiple path on same port VirtualHost

I want to add multiple paths like "localhost:8080/phpmyadmin" and "localhost:8080/index.php" but it doesn't want to work I create a phpmyadmin.conf in conf-availables with # ...
rmarquet21's user avatar
0 votes
2 answers
4k views

Why does Apache return a 400 "bad request" error when connecting to it with "openssl s_client" even though it sends TLS SNI

I have a website, accessible with HTTP over TLS. It is multi-homed, so there are several A DNS entries for the hostname. Additionally, there are several websites, with several hostnames, on the same ...
Lionel Elie Mamane's user avatar
1 vote
0 answers
398 views

NGINX won't load CSS files randomly

I recently moved from apache2 to nginx. Everything works fine but sometimes (only like 2% of the time), loading will be pretty slow for like 5-10 sec and then the html will load but the css won't. It'...
Owow's user avatar
  • 123
1 vote
1 answer
517 views

apache2.4 with vhosts & TLS certificates: certificate for wrong vhost presented

I operate a server hosting multiple virtualhosts with apache2.4. A newly hosted domain (https://www.yachtenwelt.de) is correctly using the respective TLS certificate. In addition, I have to ensure ...
DHopf's user avatar
  • 13
0 votes
0 answers
110 views

Apache works for IP but not for domain

I've been running an apache server pretty smoothly for a while now by just using my web accessible IP address (xx.xx.xx.xx) in the apache virtual host setting as follows: <VirtualHost *:80> ...
sadlyfe's user avatar
  • 101
0 votes
1 answer
44 views

If hosting only one site on a server with no control panel, is there any advantage to using a virtual host?

The site is hosted on AWS and the website is dropped into the var www html directory. Is there any advantage to setting up a virtual host considering this will be the only domain on the server?
user avatar
0 votes
0 answers
418 views

How to serve PHP on Nginx on a Query Parameter ?amp=1?

I have few virtual hosts (sites) running on this single server. Right now, on this root virtualhost i have a forum (running on Docker) but served by Nginx mysite.com and I have its AMP pages being ...
Faizan's user avatar
  • 111
0 votes
1 answer
2k views

Apache2 main domain redirecting to sub-domain when port is used on main domain

All of my http > https redirects are working perfectly fine. I have setup a separate sub-domain and port to use with PHPMyAdmin to access a MySQL DB so it is less likely to get be scanned by bots ...
willowen100's user avatar
0 votes
0 answers
864 views

PHP settings in apache2 config file completely ignored

On a fresh Debian 9 install, I installed PHP 7.2 and Apache2. php has been installed from the Sury repo with these extensions: php7.2-mysql php7.2-dom php7.2-simplexml php7.2-ssh2 php7.2-xml php7.2-...
Obprog's user avatar
  • 1
1 vote
1 answer
117 views

Second subdomain ignores DirectoryIndex and uses default domain index file

I'm running an apache2 web server that came pre-installed on debian. Apache configuration hosts file is: <VirtualHost *:80> ServerName domain.com ServerAlias www.domain.com ...
bulletgirl22's user avatar
0 votes
0 answers
1k views

(Reverse Proxy) Apache REMOTE_ADDR Returns (null)

I have a server that sits behind a reverse proxy that require client IP address, and to achieve that I'm trying with the lines below to add X-Forwarded-For in the request header, RequestHeader set &...
Zia's user avatar
  • 3
0 votes
1 answer
112 views

Redirecting subdomains - only first subdomain works

I have two domains running on Apache 2.2 for Windows. Domain 2 has both secure and non-secure access and works fine. Domain 1 has the domain and four subdomains. The subdomains redirect to ports on ...
Leora Cherry's user avatar
0 votes
1 answer
4k views

Apache virtual hosts not working as expected - my website is redirected to the default virtual host

I'm configuring a new server (droplet) with Ubuntu 18.04.1 LTS. I installed apache and configured virtual hosts. The server name is www.speedysoftware.com and this is the value of /etc/hostname. The ...
Uri's user avatar
  • 881
0 votes
1 answer
2k views

How to avoid the "Forbidden" error when changing the DocumentRoot in the default virtual host file on Ubuntu Apache?

I have Apache installed on an Ubuntu virtual machine. Typing http://localhost in the browser brings up the Apache intro site, so I know Apache works. I created the file /home/test/webs/testapp/index....
Edward Tanguay's user avatar
0 votes
1 answer
8k views

How to get Apache Virtual Host working on Ubuntu?

I have Apache installed on an Ubuntu virtual machine. Typing http://localhost in the browser brings up the Apache intro site, so I know Apache works. I created the file /home/test/webs/testapp/index....
Edward Tanguay's user avatar
-3 votes
1 answer
200 views

Best approach for hosting 100s of WordPress sites on VPS [closed]

I am looking to host 100s or maybe 1000s of isolated wordpress webistes (for development purpose) on a single VPS so what do you think will be the best approach to achieve this. It will all be done ...
verge's user avatar
  • 1
0 votes
0 answers
36 views

How to modernize apache conf virtualhost files

So I have some old Apache confs for virtualhosts that I have not updated for awhile, and I would like to review them and modernize them if needed. But I'm not quite sure where to begin or what is the ...
Jayn's user avatar
  • 1
0 votes
1 answer
748 views

Virtual Host Setup Redirecting Request to Local IP address

I want to make an application running on apache2 (ubuntu) available over the internet. So i decided to setup virtual host after purchasing a SSL certificate. Everything works fine on my Local network. ...
Jafar Kams's user avatar
0 votes
1 answer
3k views

Apache Conditional Reverse Proxy with RewriteCond

I have a website that has a mobile version page, and since my website is behind the reverse proxy, I need a conditional function that can decide which version to be shown to visitors. I'm using Apache ...
Zia's user avatar
  • 3
1 vote
2 answers
446 views

Apache Virtual host alias: internal rewrite pages not working

I have this configuration for my site.com <VirtualHost *:443> ServerAdmin [email protected] ServerName site.com ServerAlias www.site.com DocumentRoot /websites/site.com ...
C. Ovidiu's user avatar
  • 131
0 votes
1 answer
88 views

Problems with improper vhosts configuration on Apache 2 / Ubuntu 14.04

I have various subdomains set up successfully as virtual hosts on my Digital Ocean Droplet. For some reason though, my latest subdomain is serving a different subdomain, and I'm not sure why. So if ...
mheavers's user avatar
  • 127

1 2 3
4
5
56