Virtual Host Continue



Similar documents
Setup a Virtual Host/Website

Host your websites. The process to host a single website is different from having multiple sites.

Virtual Host (Web Server)

Configuring Content Switching Feature

Configuring Apache and IIS for High Availability Web Server Clustering

Services: Apache a patchy web server

Created by : Ashish Shah, J.M. PATEL COLLEGE UNIT-5 CHAP-1 CONFIGURING WEB SERVER

How To Set Up A Virtual Host In Apa On A Linux Box On A Windows Xp Or Ipa On An Ubuntu Box On An Ipa (Windows) Or Ipo (Windows Xp) On A Ubora Box On Your Ubora

Name-based SSL virtual hosts: how to tackle the problem

CO Web Server Administration and Security. By: Szymon Machajewski

Web Same-Origin-Policy Exploration Lab

Web Server using Apache. Heng Sovannarith

User s guide. APACHE SSL Linux. Using non-qualified certificates with APACHE SSL Linux. version 1.3 UNIZETO TECHNOLOGIES S.A.

How to setup HTTP & HTTPS Load balancer for Mediator

GlobalSign Solutions

Implementing Reverse Proxy Using Squid. Prepared By Visolve Squid Team

Trend Micro Worry- Free Business Security st time setup Tips & Tricks

CTIS486 Midterm Solution 23/07/ Akgül

SQL Injection Attack Lab

Multisite & Single Sign On by Ipsita Mishra

The only skill required really is to locate and edit text-files with a text-editor like Notepad.

Content. Global Delivery Network: Folders

EQUELLA. Clustering Configuration Guide. Version 6.2

Configure Wildcard-Based Subdomains

1. Configuring the Dispatcher / Load Balancer

XIA Configuration Server

tpischeduler tpischeduler TotalFBO tpischeduler TotalFBO Initial Installation tpischeduler TotalFBO tpischeduler

WebBridge LR Integration Guide

Assembling Web Development Environments with Perforce. Stephen Vance Perforce User Conference 2001

EQUELLA. Clustering Configuration Guide. Version 6.0

Reverse Proxy with SSL - ProxySG Technical Brief

Lab 3.4.2: Managing a Web Server

Apache2 Configuration under Debian GNU/Linux. Apache2 Configuration under Debian GNU/Linux

esync - Receiving data over HTTPS

1. Configuring Apache2 Load Balancer with failover mechanism

Semantic based Web Application Firewall (SWAF - V 1.6)

Apache 2.2 on QNX Neutrino 6.4.x OS Step-by-step installation manual

Web Browsing Examples. How Web Browsing and HTTP Works

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

How to: Install an SSL certificate

PROXY SETUP WITH IIS USING URL REWRITE, APPLICATION REQUEST ROUTING AND WEB FARM FRAMEWORK OR APACHE HTTP SERVER FOR EMC DOCUMENTUM EROOM

Real Vision Software, Inc.

Step-by-Step guide to setup an IBM WebSphere Portal and IBM Web Content Manager V8.5 Cluster From Zero to Hero (Part 2.)

How to Make the Client IP Address Available to the Back-end Server

Apache Web Server Complete Guide Dedoimedo

Installation Guide. Understanding Faith 2014 Intranet. Understanding Faith

Issues Faced during Installing. WebCenter Sites 11gR1 on Exalogic. Version 1.0. Vivek V Singh. Principal Solutions Architect.

Apache Server Implementation Guide

Running Multiple Shibboleth IdP Instances on a Single Host

Load Balancing Oracle Application Server (Oracle HTTP Server) Quick Reference Guide

Security-Assessment.com White Paper Leveraging XSRF with Apache Web Server Compatibility with older browser feature and Java Applet

SQL Injection Attack Lab Using Collabtive

SIMIAN systems. Setting up a Sitellite development environment on Mac OS X. Sitellite Content Management System

IP Phone Service Administration and Subscription

Best Practices in Hardening Apache Services under Linux

Technical specification

Appendix D: Configuring Firewalls and Network Address Translation

Apache & Virtual Hosts & mod_rewrite

ViMP 3.0. SSL Configuration in Apache 2.2. Author: ViMP GmbH

ISPS & WEBHOSTS SETUP REQUIREMENTS & SIGNUP FORM LOCAL CLOUD

APACHE HTTP SERVER 2.2.8

Apache and Virtual Hosts Exercises

Linux Squid Proxy Server

Oracle HTTP Server powered by Apache

Dragonframe License Manager User Guide Version 1.2.2

ISPS & WEBHOSTS SETUP REQUIREMENTS & SIGNUP FORM LOCAL CLOUD

NETWORK SETUP GLOSSARY

Apache HTTP Server. Implementation Guide. (Version 5.7) Copyright 2013 Deepnet Security Limited

Spam Marshall SpamWall Step-by-Step Installation Guide for Exchange 5.5

Installing an SSL certificate on the InfoVaultz Cloud Appliance

Apache Usage. Apache is used to serve static and dynamic content

Table of Contents. This whitepaper outlines how to configure the operating environment for MailEnable s implementation of Exchange ActiveSync.

1Intro. Apache is an open source HTTP web server for Unix, Apache

Configuring Nex-Gen Web Load Balancer

Installing Behind a Firewall or Proxy

Ruby on Rails (Ruby 1.9.2, Rails 3.1.1) Installation

Setting up an OracleAS myportal Enterprise Deployment Architecture with the CAI Networks, Inc WebMux Load Balancer. A Step-by-Step Guide Version 1.

A Beginner's Guide to Setting Up A Web Hosting System (Or, the design and implementation of a system for the worldwide distribution of pictures of

Parallels Panel. Administrator's Guide to Configuring Apache on Servers Running Parallels Plesk Panel 10. Revision 1.0

Enterprise SSL Support

Installing and Configuring Apache

Dynamic DNS How-To Guide

Summer Internship 2013

webapp.secure Installation and Setup Guide

EventSentry Overview. Part I Introduction 1 Part II Setting up SQL 2008 R2 Express 2. Part III Setting up IIS 9. Part IV Installing EventSentry 11

Installing Rails 2.3 Under Windows XP and Apache 2.2

PHP+MYSQL, EASYPHP INSTALLATION GUIDE

ITA Mail Archive Setup Guide

How Your Computer Accesses the Internet through your Wi-Fi for Boats Router

WebScheduler TotalFBO TotalFBO Initial Installation TotalFBO Connecting to a Database TotalFBO

Implementing HTTPS in CONTENTdm 6 September 5, 2012

The course will be run on a Linux platform, but it is suitable for all UNIX based deployments.

Setup and configuration for Intelicode. SQL Server Express

JMS MULTISITE for joomla!

Configuring an External Domain

Running Secure & Reliable Web/Mail/other Services from Home Part-II: Setting Up A SOHO Linux Web and Server

Application Note. SIP Domain Management

Linux Networking Basics

Moving Drupal to the Cloud: A step-by-step guide and reference document for hosting a Drupal web site on Amazon Web Services

Apache JMeter HTTP(S) Test Script Recorder

Transcription:

Virtual Hosting The term virtual Host refers to the practice of running more than one web site (such as company1.example.com and company2.example.com) on a single machine.

Virtual Host Continue There are two types of Virtual Hosting: a) Name-base Virtual Host (More than one web site per IP-Address) b) IP-base Virtual Host (An IP Address for each web site)

Virtual Host Continue If you want to maintain multiple domains/hostnames on your machine you can setup VirtualHost containers for them. Most configurations use only name-based virtual hosts so the server doesn't need to worry about IP addresses. This is indicated by the asterisks in the directives below.

Virtual Host Continue Ensure that Apache listen to you given port (ex:80) Listen 80 #Listen for virtual host requests on all IP addresses NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /www/example ServerName www.example.com #Other directive here

Virtual Host Continue Ensue that Apache listen to you given port (ex:8020) Listen 8020 #Listen for virtual host requests on all IP addresses NameVirtualHost *:8020 <VirtualHost *:8020> DocumentRoot /www/example ServerName www.example.com #Other directive here

Virtual Host Continue Let s have your Apache server listen to only port 80 Listen 80 # Listen for virtual host requests on all IP addresses NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /www/example1 ServerName www.example.com # Other directives here ================================================ <VirtualHost *:80> DocumentRoot /www/example2 ServerName www.example.org # Other directives here

Virtual Host Continue The asterisks match all addresses, so the main server serves no requests. Due to the fact that www.example.com is first in the configuration file, it has the highest priority and can be seen as the default or primary server. That means that if a request is received that does not match one of the specified ServerName directives, it will be served by this first VirtualHost.

Virtual Host Continue You can, if you wish, replace * with the actual IP address of the system. In that case, the argument to VirtualHost must match the argument to NameVirtualHost: NameVirtualHost 172.20.30.40 <VirtualHost 172.20.30.40> # etc... Some other directive...

Serving the same content on different IP addresses (such as an internal and external address). The server machine has two IP addresses (192.168.1.1 and 172.20.30.40). The machine is sitting between an internal (intranet) network and an external (internet) network. Outside of the network, the name server.example.com resolves to the external address (172.20.30.40), but inside the network, that same name resolves to the internal address (192.168.1.1). The server can be made to respond to internal and external requests with the same content, with just one VirtualHost section.

Continues Server configuration NameVirtualHost 192.168.1.1 NameVirtualHost 172.20.30.40 <VirtualHost 192.168.1.1 172.20.30.40> DocumentRoot /www/server1 ServerName server.example.com ServerAlias server Now requests from both networks will be served from the same VirtualHost. Note: On the internal network, one can just use the name server rather than the fully qualified host name server.example.com.

Running different sites on different ports. You have multiple domains going to the same IP and also want to serve multiple ports. By defining the ports in the "NameVirtualHost" tag, you can allow this to work. Server configuration Listen 80 Listen 8080 NameVirtualHost 172.20.30.40:80 NameVirtualHost 172.20.30.40:8080 <VirtualHost 172.20.30.40:80> ServerName www.example.com DocumentRoot /www/domain-80 <VirtualHost 172.20.30.40:8080> ServerName www.example.com DocumentRoot /www/domain-8080

Continues <VirtualHost 172.20.30.40:80> ServerName www.example.org DocumentRoot /www/otherdomain-80 <VirtualHost 172.20.30.40:8080> ServerName www.example.org DocumentRoot /www/otherdomain-8080

IP-based virtual hosting Server configuration Listen 80 <VirtualHost 172.20.30.40> DocumentRoot /www/example1 ServerName www.example.com <VirtualHost 172.20.30.50> DocumentRoot /www/example2 ServerName www.example.org Requests for any address not specified in one of the <VirtualHost> directives (such as localhost, for example) will go to the main server, if there is one.

Name-based vs. IP-based Virtual Hosts IP-based virtual hosts use the IP address of the connection to determine the correct virtual host to serve. Therefore you need to have a separate IP address for each host. With namebased virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address.

Continues Related Directives DocumentRoot NameVirtualHost ServerAlias ServerName ServerPath <VirtualHost>

Continues To use name-based virtual hosting, you must designate the IP address (and possibly port) on the server that will be accepting requests for the hosts. This is configured using the NameVirtualHost directive. In the normal case where any and all IP addresses on the server should be used, you can use * as the argument to NameVirtualHost.

Continues For example, suppose that you are serving the domain www.domain.tld and you wish to add the virtual host www.otherdomain.tld, which points at the same IP address. Then you simply add the following to httpd.conf: NameVirtualHost *:80 <VirtualHost *:80> ServerName www.domain.tld ServerAlias domain.tld *.domain.tld DocumentRoot /www/domain <VirtualHost *:80> ServerName www.otherdomain.tld DocumentRoot /www/otherdomain