12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

# rm data# ln –s homepage dataChapter 13You may want to have a look into the default apache configuration file located under/usr/local/etc/apache (or similar name, depending on your installation) to tweakconfiguration parameters.Virtual HostsApache can handle name-based virtual hosting, that lets you run multiple sites onthe same IP address, but differentiate them based on their hostnames. You shouldconfigure your DNS zone files in such a way that they point (for example www host)to the IP address of your web server. You should also configure your apache webserver to the server-specified directory as the home page of the specified host.To enable name-based virtual hosting, you should first modify your httpd.conf fileand uncomment the following line:NameVirtualHost *:80This will enable the functionality. Now you should add appropriate configurationclauses, for each host, to your configuration file. In this example, we have usedApache 2.0 that supports the external configuration files into httpd.conf. Hence,you will not need to modify the httpd.conf file for each virtual host. Instead youcan create a file, for example, example.com.conf, under the Includes directorywhich is under your apache configuration directory. Apache will automaticallyinclude all files with a .conf extension from the Includes directory and append itto the main configuration, during startup. The sample configuration file (for example/usr/local/etc/apache2/Includes/example.com.conf) looks like this:ServerAdmin admin@example.comDocumentRoot /usr/local/www/example.comServerName www.example.comServerAlias example.comErrorLog /var/log/example.com-error_logCustomLog /var/log/example.com-access_log common[ 229 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!