Configure Wildcard-Based Subdomains



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

Setup a Virtual Host/Website

Using IIS and UltraDev Locally page 1

MOODLE Installation on Windows Platform

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.2 Web Applications Deployed on BEA WebLogic Server 9.2

Lab 3.4.2: Managing a Web Server

SSL Installing your new Certificate

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.3 Web Applications Deployed on Oracle WebLogic Server

Apache Configuration

SCADA Security. Enabling Integrated Windows Authentication For CitectSCADA Web Client. Applies To: CitectSCADA 6.xx and 7.xx VijeoCitect 6.xx and 7.

Installation of PHP, MariaDB, and Apache

How to setup HTTP & HTTPS Load balancer for Mediator

Configuring Content Switching Feature

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

HOW TO SETUP AN APACHE WEB SERVER AND INTEGRATE COLDFUSION

Using Internet or Windows Explorer to Upload Your Site

Install Apache on windows 8 Create your own server

PHP+MYSQL, EASYPHP INSTALLATION GUIDE

Apache and Virtual Hosts Exercises

Installing Rails 2.3 Under Windows XP and Apache 2.2

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

AJ Matrix V5. Installation Manual

Web Server using Apache. Heng Sovannarith

Livezilla How to Install on Shared Hosting By: Jon Manning

Virtual Host Continue

Backup and Restore MySQL Databases

etoken Enterprise For: SSL SSL with etoken

How to: Install an SSL certificate

Getting Started with AWS. Hosting a Static Website

Exchange 2010 PKI Configuration Guide

CEFNS Web Hosting a Guide for CS212

Installing OptiRain Open on Macintosh OS X 10.6 (Snow Leopard)

Lets Get Started In this tutorial, I will be migrating a Drupal CMS using FTP. The steps should be relatively similar for any other website.

Security Certificate Configuration for IM and Presence Service

PineApp Surf-SeCure Quick

Solr Bridge Search Installation Guide

VERALAB LDAP Configuration Guide

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

NT Authentication Configuration Guide

Publish Joomla! Article

Configuring IBM HTTP Server as a Reverse Proxy Server for SAS 9.3 Web Applications Deployed on IBM WebSphere Application Server

Here, we will discuss step-by-step procedure for enabling LDAP Authentication.

You need to set up your browser in order to use the proxy server. This can be done as follows:

Configuring the Samsung SDS CellWe EMM cloud connector

OrangeHRM Web Installation Guide for Windows

Laboratory Exercises VI: SSL/TLS - Configuring Apache Server

Copyright 2012 Trend Micro Incorporated. All rights reserved.

SYWorks Vulnerable Web Applications Compilation For Penetration Testing Installation Guide

Web Proxy Auto Discovery (WPAD) Configuration Guide. Revision Warning and Disclaimer

Installing a Browser Security Certificate for PowerChute Business Edition Agent

Using Microsoft Expression Web to Upload Your Site

This document details the following four steps in setting up a Web Server (aka Internet Information Services -IIS) on Windows XP:

Alert Notification of Critical Results (ANCR) Public Domain Deployment Instructions

October, Install/Uninstall Xerox Print Drivers & Apps Best Practices for Windows 8, 8.1, and 10 Customer Tip

How to Configure edgebox as a Web Server

Changing Your Cameleon Server IP

Exostar LDAP Proxy / Secure Setup Guide. This document provides information on the following topics:

Wavecrest Certificate

TIMETABLE ADMINISTRATOR S MANUAL

BioWin Network Installation

CO Web Server Administration and Security. By: Szymon Machajewski

Configuring Sponsor Authentication

CERTIFICATE-BASED SINGLE SIGN-ON FOR EMC MY DOCUMENTUM FOR MICROSOFT OUTLOOK USING CA SITEMINDER

deskspace responsive web builder: Instructions

Manual Password Depot Server 8

Active Directory Integration. Documentation. v1.02. making your facilities work for you!

5.6.2 Optional Lab: Restore Points in Windows Vista

BusinessObjects Enterprise XI Release 2

Setting and Checking LISTSERV www Interface Permissions Windows Server 2012 with IIS 8.x Last Updated: 20 Mar 2014

PowerLink for Blackboard Vista and Campus Edition Install Guide

OpenEyes - Windows Server Setup. OpenEyes - Windows Server Setup

Practice Fusion API Client Installation Guide for Windows

PingFederate. Identity Menu Builder. User Guide. Version 1.0

Parallels Plesk Automation. Customer s Guide. Parallels Plesk Automation 11.5

About This Document 3. Integration Overview 4. Prerequisites and Requirements 6

BASIC CLASSWEB.LINK INSTALLATION MANUAL

IDAM Most frequently encountered messages / known issues document

Application Note VAST Network settings

Mapping ITS s File Server Folder to Mosaic Windows to Publish a Website

VOIP-500 Series Phone CUCM 8.0.3a Integration Guide

Download and Launch Instructions for WLC Client App Program

MassTransit 6.0 Enterprise Web Configuration for Macintosh OS 10.5 Server

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

How to Configure Active Directory based User Authentication

LabTech Remote Tray. Overview. Accessing the Tray. LabTech

Setting Up a Development Server

Microsoft Exchange 2010 and 2007

+27O.557+! RM Auditor Additions - Web Monitor. Contents

Configuring iplanet 6.0 Web Server For SSL and non-ssl Redirect

Installation / Migration Guide for Windows 2000/2003 Servers

PaperCut Payment Gateway Module - RBS WorldPay Quick Start Guide

e-cert (Server) User Guide For Apache Web Server

imhosted Web Hosting Knowledge Base

How To Install Amyshelf On Windows 2000 Or Later

Transcription:

Configure Wildcard-Based Subdomains

Apache s virtual hosting feature makes it easy to host multiple websites or web applications on the same server, each accessible with a different domain name. However, when you have a large number of virtual hosts sharing almost-identical configuration, wildcard-based subdomains simplify maintenance and reduce the effort involved in adding a new virtual host. With wildcard subdomains, it s no longer necessary to edit the Apache configuration file or restart the server to initialize a new virtual host. Instead, you simply need to create a subdirectory matching the subdomain name on the server with your content, and Apache will automatically use that directory to serve requests for the corresponding subdomain. NOTE Virtual hosts created in this manner will not be accessible from other systems, unless those systems are separately configured to associate the custom domains used by virtual hosts with the IP address of the XAMPP server. This guide walks you through the process of setting up wildcard virtual hosts with XAMPP, such that requests for subdomain.localhost are automatically served by the subdomain/ directory of the main server document root. Follow the steps below: 1. Change to your XAMPP installation directory (typically, C:\xampp) and open the httpd.conf file in the apache\conf\ subdirectory using your favourite text editor. Within the file, find the following line and uncomment it by removing the hash symbol (#) at the beginning of the line. LoadModule vhost_alias_module modules/mod_vhost_alias.so 2. Next, edit the httpd-vhosts.conf file in the apache\conf\extra\ subdirectory of your XAMPP installation directory. 3. Replace the contents of this file with the following directives: UseCanonicalName Off <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/" ServerName localhost </VirtualHost> <VirtualHost *:80> ServerAlias *.localhost VirtualDocumentRoot "C:/xampp/htdocs/%1/" </VirtualHost> 1

In this configuration, the first virtual host block configures how requests are handled by default. The second block configures wildcard virtual hosting for subdomains, such that requests for subdomain.localhost are automatically served by the subdomain\ directory of the C:\xampp\htdocs\ directory. In particular, notice the %1 placeholder, which matches the subdomain name from the request URL. 4. Restart Apache using the XAMPP control panel for your changes to take effect. At this point, your wildcard subdomains are configured. You can easily test this by using the Windows Explorer to create two new subdirectories at C:\xampp\htdocs\app01\ and C:\xampp\htdocs\app02\. Within each subdirectory, create a file named index.html and fill it with some sample HTML content. Use different content for each file, so that you can easily distinguish that they re being served from different directories - for example: <!-- index.html in app01 directory --> <html> <head></head> <body> <h1>welcome to app01.localhost!</h1> </body> </html> 2

<!-- index.html in app02 directory --> <html> <head></head> <body> <h1>hello from app02.localhost!</h1> </body> </html> Since these domains do not actually exist in reality, you also need to map them to the local IP address. Open the file C:\windows\system32\drivers\etc\hosts in a text editor and add the following line to it: 127.0.0.1 app01.localhost app02.localhost TIP You will need to do this every time you want to configure a new wildcard virtual host, because the Windows hosts file does not support wildcard entries. To avoid this step, you can use a DNS server or local DNS proxy that supports wildcards and therefore takes care of automatically resolving requests for *.localhost to the local IP address. NOTE On some versions of Windows, you will not be able to edit the C:\windows\system32\drivers\etc\hosts file without administrator privileges. You can edit the file by right-clicking the Notepad icon and selected the "Run as administrator" menu option, then entering administrator credentials (if required) and clicking "OK" or "Yes" to proceed. At this point, you should be able to enter the URLs http://app01.localhost or http://app02.localhost in your browser s address bar, and you should then see the corresponding HTML page. 3

4