Admin Panel 2: Apache Configuration: Difference between revisions
(New page: {{Uc_nav_apanel2}} '''Apache Configuration''' This page allows you to set Apache default settings after making changes it requires a '''server re-start''' for the setting to take place. ...) |
(Removed excess category tags) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 114: | Line 114: | ||
[[Category: UniCenter]] | [[Category: UniCenter]] | ||
Latest revision as of 10:05, 21 June 2013
Admin Panel 2 |
Apache Configuration
This page allows you to set Apache default settings after making changes it requires a server re-start for the setting to take place.
You can change the following Apache default values:
Name | Default value | |
---|---|---|
Server Name: | localhost:80 | ? |
Server Admin Email: | admin@localhost | ? |
Directory Index Files: | index.html index.shtml index.html.var index.htm index.php3 index.php index.pl index.cgi | ? |
Server Side Includes: | .shtml .shtm .sht | ? |
Server Signature: | On | ? |
Listen: | 80 | ? |
Server Name
Server Name sets the hostname of your server; this is used when creating redirection URLs.
When you put your server online change this to your web address. For example if you registered the following domain www.fred.com use that.
Note: To test your web site without being connected to the Internet and to prevent your browser complaining, “Server cannot be found” you need an entry in your PC’s hosts file.
- Open the file hosts
- Located in folder: C:\WINDOWS\system32\drivers\etc
- 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 http://www.fred.com (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, however you must use the registered web address in virtual hosts.
Related:
Virtual Hosting - Name based
Virtual Hosting - PAC file
New Users - Quick hosts file
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 of problems encountered.
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 severed. The first one that matches is severed and any others that may be in the same folder is ignored.
Default list:
index.html index.shtml index.html.var index.htm index.php3 index.php index.pl index.cgi
UniServer’s default installation uses index.php found in the root folder www if you insert your own index.hml page this will be picked up first hence overrides index.php
Server Side Includes:
SSI is a server side scripting language allowing you to include the contents of a file into another using commands. To insert these commands a comment tag is used. You insert these into any html file, and the server will process these tags. In order to process them Apache needs to know which files types to use the standard file extensions are .shtml .shtm .sht (default). You can specify any file extension you like even htm and html there is a small processing hit.
Server Signature
This allows Apache to add a footer line for server-generated documents it contains server version number, server name, and creates a "mailto:" reference to ServerAdmin.
If you do not like the idea of this information being displayed simply turn it off.
Listen
This tells Apache to listen to a specific port and to accept incoming requests only on that specified port. Web page servers and all web browsers default to this standard port (80), hence when a user types an address into a browser the port is automatically included.
Port 80 already in use
If another program is using port 80 you will want to change the listening port to avoid conflicts otherwise your Apache server will not start. In this situation you will need to open the configuration file and make the changes accordingly.
I have detailed how to change the port in this section. Think about the implications changing the Apache port makes the server non-standard, preferable solution, change port of conflicting program.
Apache already running
If you are changing the listening port for some other reason your server will be running hence you can use this configuration page to change the port. You must restart the servers after making a changes this allows new settings to be picked up by Apache.
General Note
After changing Apache's listing port this port number must be include in the host name in order to display a file you are serving for example suppose you have changed the port to 8080.
To view your home page you enter the following address http://localhost:8080/ into your browser address bar. Likewise to view any other page in your root folder www you would enter http://localhost:8080/mypage.html 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 admin page. In this example you will see http://localhost:8080/apanel/ displayed in the address bar.
xxxxxxxx
Ric |