Apache - config - virtual hosting
Lokacija: WebDev :: Hosting   |   Autor: cacan @ 12:02   |  

Odlican clanak o konfiguriranju Apache web servera za hostanje vise (pod)domena s jednim Apache web serverom.

  • Apache - virtual hosting - multiple (sub)domains
  • Apache - virtual hosting - multiple (sub)domains

    As a Web host, some key issues you will need to deal with when setting up a Web server include serving multiple domains on a single server, authorization, and authentication. In this second article on configuring Apache, Michael Swanson explains how to perform these tasks.
    In the previous article in this series, we described how to set up a basic Apache Web server for simple, static HTML page hosting, and also explained how to create the virtual directory structure that Apache uses to serve files out on the Web. This article will address some of the more complex issues involved with configuring an Apache Web server. Specifically, we will address how to use virtual hosts to serve multiple domains on a single physical server, how to add modular functionality to handle specific types of files (server side pre-processing of files for things like PHP and Python), and how to use authentication and authorization schemes to control access to different parts of your website.

    This creates a virtual host that listens to on port 80 and serves the folder /www/myserver/ as the root of the myserver.mydomain.com domain. You can easily define multiple different blocks of these configurations to handle many domains. To use name based hosting, you will need to invoke the “NameVirtualHost? directive on the IP address for which you will be using Name-based Virtual Hosts. This is done with the following code:



    ServerName myserver1.mydomain.com
    DocumentRoot /www/myserver1

    ServerName myserver2.mydomain.com
    DocumentRoot /www/myserver2

    The above configuration will define two different hosts to be served on the IP address. The “ServerName? directive in each “VirtualHost? block determines what files will be served based on the “Name? HTTP headers sent by the browser. This capability is very useful for small home-based Web serving environments where obtaining multiple actual WAN IP addresses would be difficult or impossible.

  • Apache - virtual hosting - multiple (sub)domains - nastavak…

  • Vezani blogovi:
  • Apache Logging - advanced access_log
  • Apache Web Server Speed Configuration Hacks (optimization, optimizing)
  • Best Free Web Hosting
  • Wikifortio - file hosting - upload-download
  • Free Content, Free Software, Free Hosting
  • Best Web Hosting
  • Firefox - memory leak fix #2

  • Was this article helful to you? If so, please click on the (+) [plus] sign below! It's Croatian digg ;-) Tnx!

       8 korisnika online   
    February 2005
    S M T W T F S
    « Jan   Mar »
    Za korisnike:

    33 queries. 0.241 seconds. Powered by Blog385.com