Admin Panel 2: Clean Server

From The Uniform Server Wiki
Jump to navigation Jump to search
Admin Panel 2

Clean Server

Clean deletes the entire contents of folder WWW on completion re-inserts the default files and folders as if a fresh install had been performed.

Confirmation

It is such a powerful facility before deleting the content of folder WWW a confirmation page is displayed

» Clean Server

Clean /www/ Directory


This will delete contents of \www\ folder
Are you sure: Yes, Continue

If you really want to clean the content of www click on the Yes, Continue link, once clicked there is no turning back. Everything in that folder will be permanently deleted and replaced with defaults.

Top

Known condition

Clean only effects folder www, all your other settings remain unchanged. This is a neat feature it allows you to experiment and if necessary get back to a known condition at the click of a button.

The defaults are:

  • .htaccess
  • favicon.ico
  • images <folder>
  • index.html

To get you started think of these defaults as templates, hack them around to see what they do. You can always generate a new set by clicking the clean button.

Top

.htaccess

For a detailed description check this page out Private Server Configuration.

# This file provides security to the server limiting access to the localhost only.
# Comment to deactivate.

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

# To allow execution of cgi scripts in this directory uncomment next two lines.

AddHandler cgi-script .pl .cgi
Options +ExecCGI

#--
# Activate this to use the Private Server Feature!
#--
# To lock server, uncomment the next 4 lines.
# Defaults: Username - root; Password - root

#AuthName "Uniform Server - Server Access"
#AuthType Basic
#AuthUserFile /htpasswd/www/.htpasswd
#Require valid-user

Top

favicon.ico

Favicons are those little images displayed on your browser’s page tab next to the page title. They are also saved with your favorites their sole purpose is to provide a visual clue to a sites identity.

Newer browsers when accessing a web page automatically request this image; to be picked up it must be named favicon.ico and placed in the root folder (www and all virtual host root folders). These images have a special format you can create them using a dedicated editor or use an online tool.

Note: If a browser request a nonexistent image its logged in Apache's error log file. If you see entries missing favicon.ico pop one in the root folder to resolve this issue.

Modern browsers (Firefox and Opera) no longer restrict you to this special file format they support GIF, animated GIF and PNG image formats. The reason I mention this is because most image editors can save files in the GIF format allowing you to create you own favicons easily. The only downside they do not automatically get picked up, you have to add a line similar to this between the header tags:


<link rel="shortcut icon" href="http://localhost/favicon.gif" type="image/vnd.microsoft.icon">

You do need to specify a fully qualified domain name for example if you registered fred.com the line would look like this:

<link rel="shortcut icon" href="http://fred.com/favicon.gif" type="image/vnd.microsoft.icon">

Uc us favicon.gif

Experiment with image size the minimum is 16x16 pixels a reasonable size is 32x32 pixels. However you can use larger images but
remember these will be compressed in some cases producing some interesting effects, experiment and have some fun.

Once you have a GIF image. To dispense with the need of adding links to every page convert the GIF into the ico format, again use
a dedicated image editor or use a free online service.

If you are keen and want to create you own favicons check out IcoFX it free and extremely powerful.

Top

images <folder>

There is nothing special about this folder its just a convenient place to save your images, you can delete or rename it.

Uc us logo.jpg

The folder contains a UniServer image used on the test page.

This image is inserted as a background image using CSS. It could have been inserted into the
page using an image tag placed between the body tags.

<img src="images/logo.jpg" width="249" height="82">

Top

index.html

If you are experimenting or just want to have a play this page makes a good starting point.

You may want to delete this first: Uniform Server <?php include "\home\admin\www\includes\.version"; ?> What it does is to insert a page title (use your own) and use PHP to insert a version number.

One point worthy of note are the PHP tags used for inserting PHP script code as shown you can use the full tag form <?PHP ?> I prefer to use the short form <? ?> Uniform Server supports both formats.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Uniform Server <?php include "\home\admin\www\includes\.version"; ?></title>
<style type="text/css">
<!--
BODY {
font-family: Verdana, Trebuchet MS;
font-size: 10px;
background-color: #4F4F97;
background-image: url(images/logo.jpg);
background-position: center 240px;
background-repeat: no-repeat;
}
-->
</style>
</head>

<body>
<img src="images/logo.jpg" width="249" height="82">
</body>
</html>

I previously mentioned inserting a logo image directly into the page I have shown this in bold.

The above I think is a very neat and quick way for new users to get started, for experienced users clean can be used to prepare the way for a full clean.

Full Clean

You can of course delete everything in folder www manually it is wise to keep the .htaccess file. Details about this file and what it can offer can be found in Private Server Configuration.

Top


Uc small logo.gif Ric