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
0answers
9 views

www+https redirection does not work even though redirection has been added in .htaccess file

I'm currently doing www+https redirection where I hope that my website able to redirect from http://example.com to https://www.example.com but it does not work even I have added redirection in ....
0
votes
1answer
27 views

Apache HTTP Server 2.4.41 is confusingly serving virtual host pages

My httpd-vhosts.conf looks like this: <VirtualHost *:80> DocumentRoot "C:/Apache24/htdocs/rodde.net" ServerName rodde.net ServerAlias www.rodde.net </VirtualHost> <...
0
votes
1answer
22 views

Apache “<VirtualHost> was not closed” error - despite it clearly being closed

I am having a really annoying issue where my newly created Apache Vhost is causing config error. I initially use cp command to copy existing and working vhost and just changed the DocumentRoot. Apache ...
0
votes
0answers
6 views

Apache2 (on Ubuntu 16.04) - when defining multiple VirtualHost error logs are missing

I defined two VirtualHosts for Apache2 - one on port 80 and the other on port 5000. For each I defined a different ErrorLog file, app1.log and app2.log. Both relevant sections look like below. <...
0
votes
1answer
59 views

How to remove bloat from my logs automatically

I was going over logs on a server with multiple vhosts/accounts, trying to figure which ones to delete because it is late in the month and an automated backup failed (I use Apache and/or Nginx). I ...
0
votes
0answers
13 views

nginx - two Symfony (3 and 4) apps in different locations (first for root and specific path, second for everything else)

I'm looking for some help with nginx vhost configuration. I need to configure two applications within one vhost (same domain, different paths): A) PHP 7.1 / Symfony3 / index = app.php B) PHP 7.2 / ...
0
votes
0answers
15 views

Apache - typing without www on my domain does not work

When i typed: example.com , my site works, but when i typed www.example.com or http://example.com it does not work, it give me This site can’t be reached. This is my Apache Configuration. <...
0
votes
0answers
55 views

Cannot access virtual hosts directory after configure apache

My virtual hosts have this configuration file: <VirtualHost *:80> ServerAdmin klebermo@gmail.com DocumentRoot /home/kleber/www/kleber ServerName klebermota.eti.br ...
0
votes
0answers
11 views

Location + BasicAuth + Fallback not working together

I have the following configuration that should accomplish the following: Any resource under the location /app should apply, so /app/index.html, /app/resource/img.gif, etc. Any resource under the ...
0
votes
2answers
22 views

Redirect Apache to a different service in subfolder

I have a CentOS 6.9 server that is running a DokuWiki under Apache/HTTPD 2.2. This wiki is installed in /var/www/html/dokuwiki. Therefore, when you type myserver.com/dokuwiki, it enters the wiki. If ...
0
votes
0answers
8 views

Apache vHost Restrict Access to All Subdirectories Except

I would like to use vHost to restrict access to all sub-directories except one. Folder structure example: - /var/www/html |- index.php |- file.php |- /var/www/html/dir1 |- ... |- /var/www/html/dir2/...
0
votes
0answers
16 views

Nginx root/location combination

I've this configuration: server { server_name my.project.com; index index.php; root /project/api/v1.0; location /api/v1.0/ { try_files $uri /index.php$is_args$args; } ...
0
votes
0answers
18 views

Nginx Block Issue: All sites redirect to default site

I had an Nginx server running serving a single site, now I have setup Nginx to use blocks so I can serve multiple sites. The issue is that all sites redirect to the default site. I have the two site ...
0
votes
0answers
29 views

Does the TLS Cert need to match SNI (server_name)/Host header?

The apache webserver uses Server Name Indication (SNI) to determine the virtual host (vhost) and with that the Transport Layer Security (TLS) certificate to respond to the TLS handshake. Is the ...
0
votes
0answers
10 views

Need to Pass Environment Variables Through Apache Proxy

BACKEND: I have Tomcat connected to Apache and JKMount'ed to webapps.demo.example.com. FRONTEND: The primary VirtualHost is setup for demo.example.com. I have one application Proxy'd to BACKEND. ...
1
vote
1answer
36 views

Apache2 wildcard alias

I have the following wildcard vHost: <VirtualHost *:80> ServerAdmin hostmaster@example.de ServerName autodiscover.*.* ServerAlias autoconfig.*.* RewriteEngine On ...
0
votes
2answers
23 views

Apache SSL vhost won't use DocumentRoot but rather uses server webroot

I have an apache config using a DV wildcard cert. The ssl.conf is configured to use the certificate for all server traffic. My vhost conf file has two virtual hosts defined there. A production vhost ...
0
votes
1answer
30 views

nginx mixing cached content between my different domains

I don't know if this is a bug or I am defining cache incorrectly, I have a nginx cache (reverse proxy) server that is used by 2 different domains (mydomain1.com and mydomain2.com), different content, ...
0
votes
0answers
33 views

Apache2 reverse-proxy not working right

I have some linux webservers, all listening on different ports. They sit behind a router, and one public IP address. Currently I can reach them like this: www.hostname.com:80 www.hosntame.com:8080 ...
0
votes
0answers
19 views

Forcing SSL in htaccess is returning list of files. How to configure SSL and virtual host

we have a website where we need to map every current http page to https to apply the ssl. If we force SSL in the site ; the SSL works but its returning the list of files. Tried to force SSL with the ...
0
votes
1answer
78 views

Apache vhost privilege separation using mod_selinux

I have 2 sites/apps on a server; a proprietary app, and Nextcloud. Nextcloud will be using the files_external storage plugin which allows for local mounts, but I do NOT want it to be able to browse ...
0
votes
0answers
33 views

Forward Subdomain to Port

I have an apache server setup and am trying to forward my subdomain to a specific port. I read on here how to do it but doesnt seem to be working <VirtualHost *:*> ServerName music.mydns....
0
votes
1answer
116 views

Cannot get Sendmail to work on Ubuntu 18.04.3 (LTS) x64 on DigitalOcean Droplet

I have taken these steps (gathered from numerous posts in this forum and others) to install and configure SendMail on my DigitalOcean droplet, running Ubuntu 18.04.3 (LTS) x64, but I have been unable ...
0
votes
0answers
23 views

Point URL to another folder

I have a sub domain: sub.example.com pointing to /var/www/wildcard and I want to serve an app in a different language from: sub.example.com/app So I've added: Alias "/app" "/var/www/app" Which ...
0
votes
1answer
21 views

Local network binding and routing

I have set up a local development environment on my laptop. It is based on Hyper-v and runs common LAMP stack on Ubuntu 18.04. On my laptop, I have set the local hosts file to point to the site ...
0
votes
1answer
16 views

JkMount on the basis of FQDN for multiple applications

using Apache HTTPD and Tomcats, I have to run two different applications on different URL's. 2 Tomcats are serving their own applications. www.abc.com www.xyz.com My Worker.properties for this is ...
0
votes
0answers
18 views

Apache Test Page after “yum update” on Centos 7

I am running Centos 7 on my server. Every morning, my website hosted on this machine does not display until I restart my apache service. I thought apache was broken somehow, so I ran yum update on my ...
0
votes
0answers
25 views

Can't access webserver on VM from host machine

I have virtual box running a CentOS instance installed with nginx and firewall ports 80 and 443 are open. I have two network adapters on the VM one with a host-only network: 192.168.56.0/24 and the ...
0
votes
0answers
46 views

LocationMatch in the virtual host not working

I need to disable the cache for certain urls. I started useing these directives in the .htaccess file, and they work: <IfModule mod_headers.c> Header unset ETag Header set Cache-Control ...
0
votes
0answers
13 views

Virtual host not serving local file

Just got a Chromebook and am trying to set up virtual hosts for the first time on my Debian (Debian GNU/Linux 9 \n \l). My /etc/hosts file looks like: 127.0.1.1 penguin 127.0.0.1 ...
0
votes
1answer
39 views

Can I return 404 or 403 if file does not exist?

Can I return a 404 or 403 status if anyone tries to open /?a=b AND 2=2 in php files? I mean: I want to return 403 or 404 status if anyone try to open index.php/?a=b AND 2=2 My vhost is: server { ...
0
votes
1answer
22 views

Default VHOST on apache2 not working if browsing to IP directly

Im pulling my hair out with Apache2 on Ubuntu 18.04. I have a couple of domains that point to Vhosts, they seem to work but for some reasons when browsing to the IP directly, if just forwards to one ...
0
votes
1answer
42 views

Apache redirect multiple https domains to one https domain using virtual Hosts

I’m running a CentOS Server with apache 2.4 that serves two domains: myurl.domain.com and myurl.otherdomain.com. Using virtualhosts I want all requests to be redirected to https://myurl.domain.com. ...
0
votes
1answer
32 views

Server Document Root changes after adding new Virtual Host

Ubuntu 18.04.3, Virtualmin 6.08, Webmin 1.932 Something strange is happening. If I have nothing in /etc/apache2/sites-enabled then I can access the Server's Homepage: ns.server.com (/var/www/html) ...
0
votes
0answers
20 views

multiple virtual hosts only forward to www based virtual host

I have 3 virtual hosts I configure in the apache httpd.conf: <VirtualHost *:80> ServerName www.example.com DocumentRoot /ec2-user/myproject RewriteEngine on RewriteCond %{HTTP_HOST} =www....
0
votes
1answer
67 views

Stop redirect IP to Domain of a folder

Everytime I try to access to http://server-ip/folder1 it redirects me to http://example.com I want to access to folder1 but it´s impossible because it's redirected to http://example.com/folder1 ...
0
votes
1answer
60 views

Google App Engine — Allow customers to connect their domain to my website builder app

I have a website builder on GAE which is successfully connected to my domain (example.com). A customer designs a website and connect it to his domain (customer.com). From programming side everything ...
0
votes
2answers
88 views

Adding virtualhost to Apache prevent access to localhost

I am using Uubntu 16.04, with Apache2 (version 2.4) on my local personal laptop for development purpose. I have added a virtual host (hehe) under sites-enabled directory. Since I have added it, I ...
0
votes
1answer
52 views

Syntax of proxy directive in virtual host - httpd

I came across a cofig file at work, but I am unsure if the syntax is correct. Based on the documentation from apache:https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxy the proxy directive'...
0
votes
0answers
123 views

Apache SSL virtual host doesn't respond (ERR_CONNECTION_TIMED_OUT)

I am a noob apache admin, please be patient! I have an Apache server on a single IP hosting a number of virtual hosts on http. I am now trying to install certificates to enable HTTPS but am having no ...
1
vote
1answer
77 views

Change the default apache configuration to serve HTTPS on two ports?

I'm running apache2 on Devuan Beowulf (~= Debian Buster), with the default configuration. In that configuration, I have: in sites-available/default-ssl.conf: <IfModule mod_ssl.c> <...
0
votes
2answers
44 views

Apache VirtualHost Error 403 You don't have permission to access / on this server

I have been trying to setup this server for so long now and have been following this article to the letter. And it works with the sample index file. But when I delete the sample index.html file, I get ...
0
votes
0answers
18 views

Apache redirect different sites to folders

I have this situation: I need to redirect different sites to different folders, for example: example.org/site1, example.org/site2. I have my main site on the following path: var/www/html/mainsite. ...
0
votes
2answers
92 views

Serve different servers based on CNAME for domain with apache?

I've looked a bit around here on serverfault, but can't seem to find anything related to my issue (maybe because i don't know what to search for). Anyways, my issue is that i have 2 servers. One main ...
0
votes
1answer
72 views

Redirect http and non-www using only mod_alias Redirect, dedup SSL configuration?

This is probably a duplicate but I can't find quite what I'm looking for. I'd like to redirect http and/or non-www to https+www. This is often cited as a canonical example of when to avoid mod_rewrite....
0
votes
0answers
42 views

Website works fine for me but others are getting ERR_TOO_MANY_REDIRECTS

I have the following Apache config file: <IfModule mod_ssl.c> <VirtualHost *:443> ServerName example.com ServerAlias www.example.com ServerAdmin webmaster@localhost ...
0
votes
1answer
37 views

Apache .conf file is not being used

I have the following laravel.conf file for my project: RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteRule ^ https://example.com%{REQUEST_URI} [L,NE,R=301] ...
1
vote
1answer
63 views

ServerAlias not working - ERR_NAME_NOT_RESOLVED

I got the following .conf file: <VirtualHost *:80> ServerName example.com ServerAlias www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html/example/public ...
0
votes
2answers
42 views

Apache redirect <ip>/<path> to <localhost>:<other port>

I'm hosting an apache web server for a few years. This is just for some side project at work and I don't have a domain. We just use the public ip wich works great. But now I did install an other web ...
0
votes
2answers
57 views

Apache2 directories with different document roots

I'm running an apache server with icinga, some personal static stuff, and nextcloud. How I'd like this to work is as follows; domain/ (all my static stuff) /nextcloud /icingaweb2 the ...

1
2 3 4 5
51