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.

learn more… | top users | synonyms (5)

3
votes
2answers
58 views

Apache Virtual Hosts (Ubuntu) ponting to wrong document root

I'm trying to setup an Apache server with several virtual hosts (www.domain.com & store.domain.com), but for some reason, when I just have one of them enabled (store.domain.com) Apache redirects ...
0
votes
1answer
19 views

Configure Apache2 sites path

I don't understand Directory and VirtualHost directives very well as I see it. I want to configure the apache server for the following behavior : Site content is at : /var/www/mywebsite I want the ...
2
votes
1answer
69 views

apache2 and VirtualHost with foreign characters and more than one Alias

I have a simple apache2 setup with two VirtualHosts. One is a domain name with "normal" characters, and one has foreign characters (with punycode). The problem is that I don't know how to add "www" ...
0
votes
0answers
22 views

Unknown activity in /var/log/apache2/other_vhosts_access.log

I have OSSEC installed on my server and am constantly getting reports for activity in my other_vhosts_access log. They have nothing to do with my websites and I cant seem to track down whats causing ...
0
votes
1answer
74 views

Add Apache_Run_User to VirtualHost

Right now on an Ubuntu 14.04 server, WordPress (and Apache2) creates folders with www-data:www-data owner:group. The goal is to have Apache create files with different owners depending on which site ...
0
votes
0answers
35 views

Multiple VirtualHost definitions with multiple ServerAlias wildcards in apache

I posted this on SO but I thought here would be a better place to get an answer. I'm trying to add multiple VirtualHost definitions to automatically point a site at the correct folder, depending on ...
0
votes
2answers
74 views

How to route requests between Nginx servers on the same IP address based on domain name?

I'm running a Debian server with Nginx installed, as well as OpenResty. I have a domain, a subdomain of that domain, and in the future will have multiple domains pointed at its IP address with A ...
0
votes
0answers
40 views

nginx server block with fastcgi_param

i have: fast cgi on tcp defined 2 vhost A, B in nginx the second B vhost has in php location block fastcgi_param PHP_ADMIN_VALUE open_basedir= for example when i browse first A site and then ...
1
vote
0answers
105 views

Libvirt & USB Hub Passthrough

I have a virtual machine which I wish to have a USB Hub and all of its devices allocated to a virtual machine. The Hub in question is a USB hub which itself is plugged into one of the ports on the ...
0
votes
1answer
53 views

Restrict access to apache document root but not for subdomains

I'm running Apache on CentOS 7. I have configured multiple virtual hosts. Their root directories are in /var/www/html/{example.com, sub1.example.com, etc.}. I have also configured a 000-default.conf ...
1
vote
1answer
48 views

I can't have my virtualhosts working properly in Apache

Although I know that this topic has been already discussed in some other threads where it is explained how to configure Virtualhosts in Apache. The thing is after looking for possible answers to my ...
1
vote
1answer
46 views

How to exclude Apache VirtualHost from global rewriting?

I have setup Let's Encrypt SSL certificate on my VPS, which works fine, but now all VirtualHost are trying to load over https://. I have found RewriteRule directive in le-redirect.conf: <...
-4
votes
2answers
116 views

setup multiple https on same server using different ports

I am trying to setup multiple https websites via apache or nginx virtualhost but i noticed i have to append the port to the end of the IP address to view the https of websites that uses non default ...
0
votes
0answers
40 views

http/https in one VHOST apache. It works, but should it?

A lot of my hosts run http and https (apache 2.4), and it would be more manageable if I could combine both configurations in one vhost directive. When searching online, I get conflicting responses ...
1
vote
0answers
75 views

nodejs app with apache2 server always shows 503

I have an apache2 server which runs all my php web application and I am trying to run a nodejs application. I have enabled proxy and proxy_http but it always shows 503 service unavailable page <...
-2
votes
1answer
39 views

Dokku different apps but same Vhost

I am just get a dedicated server and i would like to setup a dokku configuration. I bought a domain name and i would like my different application in different dokku: apps but with the same domain ...
0
votes
1answer
77 views

VirtualHost DocumentRoot cgi goes to `/var/www`

I have an apache based web server I am called to do some maintenance on a few times a year. For this purpose I keep a local mirror so I can do what's required then upload the changes. I haven't used ...
0
votes
3answers
1k views

Nginx disable .htaccess and hidden files but allow .well-known directory

I have a Nginx server, and disabled hidden files in the nginx_vhost.conf ## Disable .htaccess and other hidden files location ~ /\. { deny all; access_log off; ...
0
votes
0answers
38 views

Apache name-based TLS/SSL virtual hosts don't work properly when using wildcard for IP

I have two VPSs running Apache 2.4 on CentOS 7 each hosting several virtual hosts, listening on port 80 for HTTP connections and port 443 for HTTPS connections: VPS1 (Xen): domain.tld /var/www/...
0
votes
1answer
59 views

Subdomain With Custom URL/Domain

I have a subdomain called 'mysite' at this.example.org/mysite which needs to resolve to mysite.org in the address bar. Can this be accomplished with .htaccess in the mysite public_html folder, or ...
1
vote
1answer
51 views

Is it possible to send the same domain to a different vhost on Apache?

I need to send my local users on my LAN who visit mydomain.com to virtual host A. Then external visitors from the web who visit mydomain.com are redirected to virtual host B. The reason being; I would ...
0
votes
0answers
40 views

Is it possible to send the same domain on an Apache server to a different vhost?

I am wondering if it is possible to send a domain to a different virtual host on running Apache based on the users location. For example users on my LAN who visit my domain.com get directed to ...
1
vote
2answers
29 views

In an apache ServerAlias directive, what does a question mark mean?

Apache's documentation says: The ServerAlias may include wildcards, if appropriate. and The wildcard characters * and ? can be used to match names My colleague claims that the question ...
1
vote
0answers
162 views

Java application is slow in virtual server (KVM)

I have a Java web application, which runs from JAR, starts embedded Tomcat and is using Spring Boot. Problem is that it runs very slow when running in KVM virtual guest. The same application in the ...
1
vote
0answers
32 views

HTTP to HTTPS redirect not working!? - Tried multiple methods

I purchased a Standard UCC SSL Up to 100 pack from Godaddy. I have installed all the required files on my server, and going to https://www.example.com works fine, but http://www.example.com is NOT ...
-1
votes
1answer
51 views

Enable an external website to resolve to a page on my parent website, keeping URL the same

I have a domain, www.example.COM. I have a page on that domain, www.example.com/page. I have another domain, www.example.NET and I want that domain to resolve to the page first mentioned, www.example....
-1
votes
1answer
35 views

Make Apache work on a custom port using iptables only

My Apache/2.2.14 (Ubuntu) is running on port 80. I'm trying to make it listen on port 999 as well, but without making any changes to the apache config, only using iptables. I've added this to the ...
0
votes
2answers
23 views

single apache with many virtualhosts but only some of them have https

I have apache listening on 80 and runs 4 sites: aaa.com:80 bbb.com:80 ccc.com:80 ddd.com:80 I enable port 443 and add SSL cert only for the first 2 sites ("aaa" and "bbb") and it works well, so ...
0
votes
0answers
98 views

Second subdomain redirects to the main domain, but URL remains the same as second domain

It's quite strange to see this issue as title describes. Here are the details: 1) Created a A-record with "a1". Means subdomain is: a1.example.com, 2) created directory by "sudo nano /var/www/a1....
-2
votes
2answers
40 views

apache https applies to other http vhosts [duplicate]

I've searched a lot, i also tried lots of thing but still cannot find the problem. I have an apache 2.2.22 server installed on an ubuntu server 12.04 lts. I have a number of http virtual hosts and 2 ...
1
vote
1answer
29 views

How to resolve hostnames from a intranet interface? [duplicate]

I have a public IP and some hostnames pointing to it, on this public IP server I have others intranet interfaces running apache virtual hosts servers, my question is how can I forward external ...
0
votes
1answer
19 views

make apache send header 401 unless a parameter is present [duplicate]

I have a rest api that has to be executed only if the parameter "manual" is present in the request. I tried with a RedirectMatch directive inside the virtualhost declaration RedirectMatch 401 "^\...
0
votes
0answers
18 views

Identifying PHP module already loaded breaking new Nginx virtual site

This is my first time on Server Fault, so I hope this is something you can help with. I have added a second website to my Nginx server, but the PHP site installation isn't working and gives the error:...
0
votes
3answers
153 views

Nginx: proxy_pass dynamic from location

I hope you can help me with a little but tricky nginx problem: I want to configure a dynamic location-block like this: location /test1/* { proxy_pass destination.com/api/*; ...
1
vote
2answers
63 views

Disable Apache Virtual Hosts for the IP, but not for the (sub)domains

I configured one domain and two subdomains, with a redirect to the corresponding https version: <VirtualHost *:80> ServerName domain.com Redirect permanent / https://domain.com </...
0
votes
0answers
51 views

NGINX returning 404 error for just one file

I have an NGINX setup with virtual hosts running on Ubuntu 15. On one of them, suddently, a file called assigndocs.php returns a 404 error. But just that one file. All the solutions I found answer ...
0
votes
2answers
106 views

HTTP working HTTPS not working

I set up Comodo SSL on CentOS 6.7 and Apache/2.2.15 and we are running a CakePHP application on the server. When I go to http/domain its working but when I go to httpS/domain it says 404 Not Found (...
0
votes
0answers
20 views

Assign a large subnet of IPs to KVM Guest VM

I have KVM host node running a few VMs. I create them using SolusVM panel, however they don't have an option to add bulk IPs in one shot to a guest VM which is silly. I'd like to know how I can add a /...
-1
votes
1answer
34 views

Linus virtualserver - multiple URLs and IP address

I set up a Linux virtualhost on server with IP address 888.888.888.888 where document root for URL site1.mysite.com is /var/www/content1 and document root for URL site2.mysite.com is /var/www/...
0
votes
2answers
72 views

How can I add a trailing slash to a virtual host?

Clearly I don't know what I'm doing because I've been at this one for hours. I have an apache virtual hosts configuration and am mapping subdirectories to different servers. for instance: <...
0
votes
2answers
41 views

Can I use apache to reverse-proxy based on subdirectory instead of subdomain?

What I have now is several virtual hosts that are identified by subdomain, and then proxied to a server like so: <VirtualHost *:80> ProxyPass / http://192.168.1.1/ ProxyPassReverse / http://192....
0
votes
1answer
36 views

can access virtualhost locally on the same server but cannot access on remote machine

A pretty wired problem occured when configure a virtualhost at port 81. When I use command curl 123.123.123.123:81 or curl localhost:81 in the same server, it got response. While when I access it ...
0
votes
2answers
158 views

SSL on apache; the requested URL was not found

I am setting up SSL on my Apache/2.4.6 RHEL server. In httpd.conf, have VirtualHosts as shown below... <VirtualHost *:80> ServerName foo.bar Redirect permanent / https://foo.bar </...
1
vote
1answer
65 views

Apache SSL virtual hosts sharing same DocumentRoot

I have a web server with two domains pointing to the same document root. I have separate SSL certs for the two domains. I want (almost) everything that comes to the site(s) to run under SSL. All works,...
0
votes
2answers
64 views

Redirect if user uses IP and not (Sub)Domain

I have an Apache server and I want to redirect every user that is connecting to my Website if they don't use a specific Domain, in this case a subdomain. So if I use the IP I want to get redirected to ...
0
votes
1answer
28 views

Redirecting subdomain to utorrent server

I have the subdomain: ut.domain.com The virtual host is set up below. <VirtualHost *:80> ServerName ut.domain.com ProxyRequests Off <Proxy *> Order deny,allow Allow from all <...
0
votes
0answers
105 views

Apache aliases configuration returns 404

I have being searching the web and trying multiple configurations to be able to solve this issue. There are multiple examples on Apache website, tutorials and questions but I am not reaching the ...
0
votes
0answers
40 views

How to block referral source on apache with special characters?

I've been getting referral spam on my site. I've tried several options to block it, but it still hits it. I think it has to do with being special characters on the referral? This is the referral ...
1
vote
2answers
112 views

Redirect multiple sites (HTTP and HTTPS) to a single page (ngxin - ubuntu)

I've currently got a floating IP pointing at a server hosting a number of sites, some with SSL, others without. I need to shutdown, backup and resize said server - and was hoping to setup a simple ...
0
votes
2answers
97 views

Serve multiple domains on one ip and one port

I want to serve multiple domains on my CentOS server. I run servers on http. Now I want to run these servers on https using another certificates. I written ssl.conf like this. Listen 443 <...