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.

HTTP Virtual Hosting

In HTTP, virtual hosting refers to the serving of content for multiple domains from a single server. The most common form of virtual hosting is properly called "name-based virtual hosting", where the content to be shown is based on the domain name being requested. Less frequently, virtual hosting can be done by using the destination IP address to select which content to show (this is most commonly used when hosting HTTPS websites).

Guides for configuring virtual hosting in a number of common web servers include:

Mail Virtual Hosting

Mail service can also benefit from a form of virtual hosting. In this instance, the receiving SMTP server performs local delivery based on the entireity of the e-mail address (rather than just the local-part), and users login to their POP3/IMAP server using a username that includes their domain (this is usuallythe user's e-mail address) rather than a bare username, and the server looks up the login details and configuration information for the user based on that fully-qualified name. This allows multiple users with the same local-part to use the same server.

Most "integrated" mail services support this feature "by default"; that is, users always use their full e-mail address to login. However, most standalone mail servers do not support this by default and require additional configuration.

Further Reading

2749 questions
0
votes
1 answer

nginx virtual host same IP for 2 domains

My question is quite different than thousand of similar questions out there. I have 2 dedicated servers. The stronger one is serving MyMainDomain.com My weaker server but huge hard drive is hosting MyOtherDomain.com and also images in sub domain…
Phung D. An
  • 150
  • 8
0
votes
1 answer

Exclude certain paths on https redirect by letsencrypt

I have an application on a lamp stack. The application uses let's encrypt SSL certs for https. One function of the application is to allow users to embed certain content in an iframe on other sites. Using the Let's Encrypt certification script, I…
ymdahi
  • 103
  • 5
0
votes
3 answers

Apache how to prevent access on https and http without a matching domain

Here are my requirements: Host multiple sites on same server. Some sites use SSL others do not.(port 443 and 80) If the domains don’t match then return a 403 or custom response The server is a LAMP stack with Ubuntu using Apache 2.4+. Currently my…
Gruneich3
  • 1
  • 1
0
votes
1 answer

Deleted my WordPress files from a directory, whole PHP config is messed up now

It was working fine before I deleted all of my WordPress files from example2.com/blog. I now get Error 500 for every page and website I try to access on the server. I enabled HTTPS with CloudFlare before I deleted the files, so that could be part of…
0
votes
1 answer

Nginx fallback configuration in case DNS is unreachable

How do I configure multiple virtual nginx server so that they respond to a subdomain and an ip/path combination like: virtual host A: a.example.com xxx.xxx.xxx.xxx/a virtual host B: b.example.com xxx.xxx.xxx.xxx/b Currently the DNS is down and our…
pauel
  • 115
  • 1
  • 1
  • 5
0
votes
1 answer

configure reverse proxy for subdomain but keep domain for links

I have a website (developed in ruby on rails + angularJS and running on nginx + unicorn) where users can access few pages through differents URIs. For example, www.example.com/1234 and 1234.example.com load the same content. The problem is links in…
MAL
  • 3
  • 1
  • 3
0
votes
1 answer

HTTPD VirtualHost config not working properly

Got a new VPS, installed everything, time to setup a virtual host #vim /etc/httpd/conf.d/project.conf DocumentRoot "/var/www/html/project.net/wordpress" ServerName project.net ServerAlias…
0
votes
2 answers

Web server showing IP address instead of domain name

I'm running a web server (Apache2) on CentOS 7. I have the following virtual host file. The site is being served as it should. However, the URL is changed in the browser (any browser) from the domain name verizondecom.com to the server's IP address.…
scott80109
  • 153
  • 4
  • 11
0
votes
1 answer

Multiple Domains and Subdomains on one IP Apache2

I have two virtual hosts on one IP, www.example.com and www.example2.com. The default, example.com, has a subdomain, docs.example.com that works fine, and it also has an SSL certificate, and it forces https on example.com. When I try to set up a…
Angie
  • 3
  • 1
  • 3
0
votes
1 answer

Multiple virtualhosts with the same servername

I have an apache server, a unique domain name and multiple tomcat instances, here is my actual config : ServerName my.domain.com ... ProxyPass /sample_1 ajp://127.0.0.1:8009/sample_1 ProxyPass /sample_2…
Belgacem
  • 3
  • 1
0
votes
2 answers

Apache2 behind Port forward NAT

In my home, I have two routers. The first (192.168.1.1) is working as ADSL modem and works as ISP for the second router (192.168.2.1). My LAN (Wifi) is built on the second router. I am using port forward twice: from the first router port 80 to the…
SaidbakR
  • 105
  • 7
0
votes
1 answer

Apache LocationMatch not matching

I'm trying to set up request throttling for certain sensitive URIs in an apache (v2.2) virtualhost with mod_security, but finding trouble with the use of LocationMatch. So far the configuration is as follows: ServerName…
André Fernandes
  • 969
  • 1
  • 10
  • 25
0
votes
1 answer

VirtualHost / httpd not accepting absolute paths

In my previous question, SSL certificates weren't working for me, until I got it to work using relative paths rather than absolute. Question: Why won't my VirtualHost/httpd not accept absolute paths? Is there some configuration or something? My…
Mz.
  • 17
  • 1
  • 7
0
votes
3 answers

httpd returns "SSLCertificateFile: file '/var/iwww/certs/msdfw/c.pem' does not exist or is empty"

So recently, I had to reset my server because of some issues and stuff. And now, I've been trying to set it up again and it's just not working out for me. I've installed httpd successfully and it works with my websites. But when I try to add an SSL…
Mz.
  • 17
  • 1
  • 7
0
votes
2 answers

404 not found error for virtual host

In my /etc/apache2/sites-enabled, i have a file site2.com.conf, which defines a virtual host as follows : ServerAdmin hostmaster@wharfage ServerName site2.com ServerAlias www.site2.com site2.com DirectoryIndex index.html…
qubit