Changes

Jump to navigation Jump to search

Coral: apache basic configuration

7,741 bytes added, 13:34, 12 November 2011
Created page with "<div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font..."
<div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font-size:12px">'''''Coral'' :'''&nbsp; [[Coral: apache intro|Apache]] | [[Coral: apache basic configuration|Apache Basic Configuration]] | [[Coral: apache vhosts|Apache Vhosts]] | [[Coral: apache ssl|Apache - SSL]] | [[Coral: apache server cert self signed|Apache - Server Certificate Self-Signed]] | [[Coral: apache free server cert|Apache - Free Server Certificate]]</span></div>

{|style="margin-top:5px;"
|-valign="top"
|
<span style="margin-bottom:5px;font-size:25px;color: #31799F;">Apache Basic Configuration</span>

This sub-menu allows you to change commonly configured Apache options.

__TOC__

|
{| cellpadding="0" cellspacing="0" style="margin-left:6px;margin-bottom:5px;padding-left:6px;padding-right:6px;font-size:11px;background-color: #FFFFEB;border: 1px solid darkslateblue;"
|-
|colspan="2" style="font-weight:bold;"| UniServer&nbsp;8-Coral
|-
|&nbsp;||[[Coral: Introduction|Home]]
|-
|&nbsp;||[[Coral: start quick start|Quick Start]]
|-
|&nbsp;||[[Coral: general intro|General]]
|-
|<span style="font-size: 14px;">»</span>||[[Coral: apache intro|Apache]]
|-
|&nbsp;||[[Coral: mysql intro|MySQL]]
|-
|&nbsp;||[[Coral: php intro|PHP]]
|-
|&nbsp;||[[Coral: msmtp intro|MSMTP]]
|-
|&nbsp;||[[Coral: cron intro|CRON]]
|-
|&nbsp;||[[Coral: dtdns intro|DtDNS]]
|-
|&nbsp;||[[Coral: dbbackup intro|Db Backup]]
|-
|&nbsp;||[[Coral: perl intro|Perl]]
|-
|&nbsp;||[[Coral: index main|Main Index]]
|}

|}

==Overview==
The Uniform Server's default installation configures the main server with the values shown at right.

<span style="padding:6px;background-color:#99FFFF"> '''UniController:''' Server Configuration > Apache > Edit Basic Configuration</span>

{|
|-
|
* 1) '''Server Name''' sets the hostname of your server; for example, fred.com
* 2) '''Admin E-mail''' Use a real e-mail address for users to contact; for example, admin@fred.com
* 3) '''Directory Index Files''' This list is searched when a client requests an index page without explicitly specifying it. If a match is found that index page is served.
* 4) Apache processes files with the extensions listed; any '''SSI Server Side Includes''' directives found in these files are executed.
* 5) '''Server Signature''' This allows Apache to add a footer line for server-generated documents (Value is On or Off).
* 6) '''Listen Port''' This tells Apache to listen to a specific port and to accept incoming requests only on that specified port.
* 7) '''Update Configuration''' button applies the changes.

|
[[Image:Coral_apache_basic_config_1.gif]]
|}
'''Note:''' For the new settings to become effective, you must '''restart Apache'''.

'''''[[#top | Top]]'''''

==Server Name==
Server Name sets the hostname of your server; this is used when creating redirection URLs.


If you put your server online, change this to your web address. For example, if you registered the domain www.fred.com, then use that.


'''Note:''' To test your web site without being connected to the Internet and to prevent your browser complaining that the "Server cannot be found", you need an entry in your PC’s hosts file. For the above example, put in 127.0.0.1 www.fred.com

* Navigate to folder: '''C:\WINDOWS\system32\drivers\etc'''
* Open the file '''hosts'''
* At the end of this file, add: '''127.0.0.1 www.fred.com''' (use your own domain)
* Save this file. Now when you type '''<nowiki>http://www.fred.com</nowiki>''' (your domain) into your browser address bar you will be able to view your web site.

If you are hosting more than one domain using name-based virtual hosting, you can leave the default setting, but you must use the registered web address in the virtual hosts.

'''''[[#top | Top]]'''''
==Server Admin Email==
The Server Admin Email address is included with some automatically generated error pages sent to a client (user). Use a real e-mail address for users to contact you in case problems are encountered.

'''''[[#top | Top]]'''''
==Directory Index Files==
When a client requests an index page without explicitly specifying it (for example '''www.fred.com''') the list of '''index pages''' specified in '''Direct Index Files''' is searched in the order left to right. If a match is found, that index page is served. The first one that matches is served and any others that may be in the same folder are ignored.


'''Default list:''' index.html index.shtml index.html.var index.htm index.php3 index.php index.pl index.cgi


The Uniform Server’s default installation uses index.php, which is found in the root folder '''www'''. If you insert your own '''index.html''' page, this will be picked up first, overriding '''index.php'''

'''''[[#top | Top]]'''''
==Server Side Includes==
SSI is a server side scripting language allowing you to include the contents of a file into another using SSI commands.

To insert these commands, a special comment tag is used; for example:

{|
|-
|
<pre>
<!--#include file="external.htm"-->
<!--#include virtual="/external.htm"-->
</pre>
|
The first command assumes that the file is located in the same directory as the document containing it, while the second syntax uses an absolute reference to "external.htm", starting from your root HTML directory.
|}

You can insert these into an html file, but in order to process them, Apache needs to know which files types to use. The standard file extensions are:

* .shtml .shtm .sht

You can specify any file extension you like, even .htm and .html, but there is a small processing hit for each file accessed.

'''''[[#top | Top]]'''''
==Server Signature==

This allows Apache to add a footer line for server-generated documents. It contains the server version number, server name, and creates a "mailto:" reference to ServerAdmin.


For security reasons, this information is normally not displayed except for testing and the default is set to '''off'''.

'''''[[#top | Top]]'''''
==Listen Port==

This tells Apache to listen to a specific port and to accept incoming requests only on that port. Web page servers and all web browsers default to this standard port (80), which is reserverd for World Wide Web traffic (WWW). When a user types an address into a browser, the port is automatically assumed unless overridden, as explained later.

'''Port 80 already in use'''<br />
If another program is using port 80, you will want to change the listening port to avoid conflicts, or your Apache server will not start. Before changing the Apache port, be aware that this makes the server non-standard. A preferable solution is to change the port of the conflicting program.


'''Apache already running'''<br />
You can change the port while the server is running, but you must restart the servers after making any changes. The new settings will then be picked up by Apache.


'''General Note'''<br />
After changing Apache's listing port, in order to display a file you must include this port number in the host name. For example suppose you have changed the port to 8080.


To view your home page you enter the following address '''<nowiki>http://localhost:8080/</nowiki>''' into your browser address bar. Likewise to view any other page in your root folder www you would enter '''<nowiki>http://localhost:8080/mypage.html</nowiki>''' to display that page.


'''Note:'''
When the server starts, the correct port number is automatically added to the address and redirection takes place to the splash page. Using the above port, you will see '''<nowiki>http://localhost:8080/us_splash/index.php</nowiki>''' displayed in the address bar.

'''''[[#top | Top]]'''''

----

[[Category: Uniform Server 8-Coral]]

Navigation menu