Knowledgebase


Use Code KBALL501M

50% OFF First Month!

on selected monthly services


Cloud Hosting Applications - Creating Websites (Apache)
Posted by Cinu Varghese on 24 September 2010 10:36 AM

Applicable Plans - eApps Cloud Hosting Plans (eApps templates only)

User Guide - Creating Web sites (Virtual Hosts) in the Control Panel

Overview

For hosting web sites, the Control Panel uses the Apache HTTP Server, which is the most widely used HTTP server (also known as a web server) on the Internet.

Using the Control Panel, you can easily create and manage web sites on your Virtual Machine. You can also install and enable certain applications, such as WordPress, Joomla! or Drupal.

Creating Web Sites

Managing Web Sites
Applications
Edit Directives
ProxyRequests

Links to other information


Creating Web Sites

Warning Before you can add a domain as a website (virtual host), that domain has to be added to the DNS Manager. See the User Guide: DNS Manager - http://support.eapps.com/portal/dns if you need further information.

To create a web site, log in to the Control Panel, and from the System screen, click on Website Management.

This takes you to the Apache Webserver screen, which will list any created web sites. To create a new web site, click on Create Web Sites.

Apache Web Server - Create Web Sites


This takes you to the screen where you can enter the details for your new web site.

Create a New Web Site

Create a New Web Site

  • Handle connections to address - for most sites, select the default of Specific address, and from the drop down list choose the IP address that matches the domain name that you will be creating the site for. Remember that you can have multiple sites on the same IP address. The other two options: Those not handled by another server and Any address are available for users who specifically need them.

    Leave Add name virtual server address (if needed) and Listen on address (if needed) at their default values (checked).

  • Port - choose port 80 for a normal http site, and port 443 if you are configuring a site using https (SSL). To use port 443, you will need to either purchase an SSL Certificate, or set up a self-signed SSL Certificate. See the User Guide: Using SSL - http://support.eapps.com/apps/ssl for more information.

  • Administrative User - this is the user that “owns” the web site, and all the files for that web site. This means that only the Administrative User can modify or upload files for the web site (aside from the root user).

    • Existing user - the Template is created with one user: webadmin, which is located at /home/webadmin. If you have only one site, or only one person or group will be managing all the sites, you can choose that user.

    • New user - if you will have multiple users that have to manage separate sites (where each user and site should not have access to other site files), then you can create a New user.

      • New user name: - enter the name for the new user, in lower case letters. Keep the user name between 6 and 8 characters.

      • Password: - enter a password for the user, which must have a minimum of 6 letters, and at least one special character such as !@#$%^&*()

      • Re-type password - re-enter the password to verify

    If you create a New user, then a new directory will be created for that user, at /home/user_name, which is where all the files for any sites that are owned by that user will be located.

  • Website Name - enter the domain name for this web site in the text box. Only enter the fully qualified domain name (FQDN) - for example, only enter example.com, not www.example.com. If you enter www.example.com, then you will have DNS entries like www.www.example.com, which can cause confusion.

  • Prevent hot linking - “Hot linking” is when another site links to your content (usually images or media) from their site, instead of hosting that content on their own site. In some cases, this can impact your service, and also use your bandwidth and resources.

     

    A word of caution - A common practice is to have the image files such as header or footer graphics and logos or banners in a common folder for all sites. Then each site is configured to use this one folder instead of having separate folders for each individual site. This is technically hot-linking, since the sites are using content outside their own directory. If you check this box, you would disable the ability to share these images and content between sites. If you are having trouble displaying images that you expect to appear across all sites, make sure that this box is unchecked to see if that resolves the issue.

  • Enable SuExec - suexec allows CGI or SSI scripts to run as the user who owns the site (the Administrative User) instead of as the user who owns the webserver process (the apache user). Only disable this if you have a specific need to do so.

  • Enable Mail Service - this will add the domain name to the mail server, and allow you to receive e-mail for this domain on the Virtual Machine.

Once you have entered the information, click on Create Now to create the web site.

 


As an example, here are the settings to create a web site for the domain of eapps-example.com, using the webadmin Administrative User.

Create Web Site - eapps-example.com


Once you click on Create Now, the web site is created, and you are returned to the main Apache Webserver screen. This now shows the new web site in the Existing Web Sites list.

Apache Web Server - Existing Web Sites

  • Server Name - this is the name of the web site, from the Website Name value when the web site was created. Click on the Server Name to manage the web site.

  • Address - this is the IP address of the web site.

  • Port - this is the port that the web site is listening on.

  • Document Root - the absolute path to the DocumentRoot for the web site.

  • URL - click Open.. to open the web site.

If you wish to delete a web site, click the check box to the left of the Server Name value, and then click on Delete Selected Servers. This removes the entry for the web site from the Apache Web Server configuration file at /etc/httpd/conf/httpd.conf, but does not remove the files in the DocumentRoot for the web site. If you need the files in the DocumentRoot removed, you will need to do that manually.


Managing Web Sites

To manage a web site, click on the name of the web site in the Server Name column on the Existing Web Sites screen.

Server Name


This takes you to the Website Management screen.

Website Management

There are quite a few options available, but only two of them: Applications and Edit Directives, are generally used. The other options assume that you are an advanced user who needs to do very specific configuration to your web site.

Applications

The eApps supported web applications that are available to be installed are listed in the Website Applications screen. These applications are (currently) AWStats, Drupal 6, Drupal 7, Joomla!, osCommerce, and WordPress. From the Applications screen you can Install the application, or Remove if the application is already installed.

Website Applications

Install makes the application available to all sites on the server, but you will have to Enable the application on a per-site basis.

Remove will remove the application from all sites on the server, even if the application is in use!

Disable will remove the application from a specific web site. However, be aware that Disable removes all traces of the application from the site, it just doesn’t turn it off. In other words, if you are using Drupal on your web site, and Disable it, then ALL the Drupal files are removed (meaning all your content), including the Drupal database specific to that web site. Please be cautious when using this feature.

See the User Guides for these applications for more information, found in the Links to other information section of this User Guide.

Note Since you have root access to your Virtual Machine, you can install any application you wish that will run in your hosting plan. However, be aware that eApps offers no free support for applications you install yourself.

If you need a specific application installed that is not offered by eApps, you can also contract with eApps to install that application for you. Please contact our Sales team for more information.

Edit Directives

Edit Directives is where the virtual host directives for the web site are managed. Any options that you would normally place in the VirtualHost block for the site in /etc/httpd/conf/httpd.conf can go here.

Edit Directives

The top section, with the text box starting with the DocumentRoot, is where you will add any new directives to the web site, such as an mod_jk directives for a Tomcat, JBoss, or GlassFish web site. This is also where you would change the DocumentRoot for the site if you needed to do that. If you have custom changes to the site that would normally go in the VirtualHost block in the Apache configuration file, those changes can be added here instead.

If changes to Edit Directives are needed by an application, the User Guide for that application will give an explanation of what needs to be added or changed. Just be aware that this is where the changes are made.

Once you have made any changes to the Directives for the web site, click on Save.

The bottom section, for Per-Directory Options, is rarely used. Most of the options here are generally done from the command line by advanced users.

ProxyRequests

In the Apache httpd.conf file, the ProxyRequests setting is Off by default. Do not set this to On - doing so will allow outside users to proxy all their web traffic through your Virtual Machine, and you could be liable for any overage charges incurred.


(80 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).