Admin Panel 2: Private Server Configuration: Difference between revisions

m
Reverted edits by Upazixorys (Talk); changed back to last version by Ric
No edit summary
m (Reverted edits by Upazixorys (Talk); changed back to last version by Ric)
Line 1: Line 1:
=[http://atosaca.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
{{Uc_nav_apanel2}}
{{Uc_nav_apanel2}}
This page allows you to set-up a username and password making your web page server private (restricts access to the root folder www). To use this feature you need to activate it in the file /www/.htaccess I have provided a detailed description how to do this see below.
This page allows you to set-up a username and password making your web page server private (restricts access to the root folder www). To use this feature you need to activate it in the file /www/.htaccess I have provided a detailed description how to do this see below.
Line 5: Line 4:
'''Defaults'''
'''Defaults'''


<table border="0" cellspacing="2" cellpadding="2">
<table border="0" cellspacing="2" cellpadding="2">
       &lt;tr&gt;
       <tr>
         &lt;td bgcolor=&quot;#B5B5B5&quot;&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;
         <td bgcolor="#B5B5B5"><strong>Name</strong></td>
         &lt;td bgcolor=&quot;#B5B5B5&quot;&gt;&lt;strong&gt;Default value&lt;/strong&gt;&lt;/td&gt;
         <td bgcolor="#B5B5B5"><strong>Default value</strong></td>
         &lt;td&gt;&amp;nbsp;&lt;/td&gt;
         <td>&nbsp;</td>
     &lt;/tr&gt;
     </tr>
       &lt;tr&gt;
       <tr>
         &lt;td bgcolor=&quot;#DADADA&quot;&gt;Username:&lt;/td&gt;
         <td bgcolor="#DADADA">Username:</td>
         &lt;td bgcolor=&quot;#DADADA&quot;&gt;&lt;strong&gt;root&lt;/strong&gt;&lt;/td&gt;
         <td bgcolor="#DADADA"><strong>root</strong></td>
         &lt;td bgcolor=&quot;#FFFFFF&quot;&gt;This form displays current settings, which is &amp;#8220;root&amp;#8221; for
         <td bgcolor="#FFFFFF">This form displays current settings, which is &#8220;root&#8221; for
           both name and password.&lt;/td&gt;
           both name and password.</td>
       &lt;/tr&gt;
       </tr>
       &lt;tr&gt;
       <tr>
         &lt;td bgcolor=&quot;#DADADA&quot;&gt;Password:&lt;/td&gt;
         <td bgcolor="#DADADA">Password:</td>
         &lt;td bgcolor=&quot;#DADADA&quot;&gt;&lt;strong&gt;root&lt;/strong&gt;&lt;/td&gt;
         <td bgcolor="#DADADA"><strong>root</strong></td>
         &lt;td&gt;When you choose your own make sure they are different. &lt;/td&gt;
         <td>When you choose your own make sure they are different. </td>
       &lt;/tr&gt;
       </tr>
     &lt;/table&gt;
     </table>
After saving your user name/password pair you can find them in file '''.htpasswd''' this file is located in folder '''*\Uniform Server\udrive\htpasswd\www'''
After saving your user name/password pair you can find them in file '''.htpasswd''' this file is located in folder '''*\Uniform Server\udrive\htpasswd\www'''


Line 45: Line 44:
The file looks like this:
The file looks like this:


&lt;pre&gt;
<pre>
# This file provides security to the server limiting access to the localhost only.  
# This file provides security to the server limiting access to the localhost only.  
# Comment to deactivate.
# Comment to deactivate.
Line 64: Line 63:
# Defaults: Username - root; Password - root
# Defaults: Username - root; Password - root


#AuthName &quot;Uniform Server - Server Access&quot;
#AuthName "Uniform Server - Server Access"
#AuthType Basic
#AuthType Basic
#AuthUserFile /htpasswd/www/.htpasswd
#AuthUserFile /htpasswd/www/.htpasswd
#Require valid-user
#Require valid-user
&lt;/pre&gt;
</pre>
I have split the above into three sections, describing each section in detail at the end I combined all three section.
I have split the above into three sections, describing each section in detail at the end I combined all three section.
'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 77: Line 76:
Deleting the htaccess file is a bit draconian you loose flexibly and control for example lets look at the first section of this file.  
Deleting the htaccess file is a bit draconian you loose flexibly and control for example lets look at the first section of this file.  


&lt;table style=&quot;background-color:#00ff00&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot;&gt;
<table style="background-color:#00ff00" width="100%" border="0" cellpadding="2" cellspacing="1">
&lt;tr bgcolor=&quot;#A8A8A8&quot;&gt;
<tr bgcolor="#A8A8A8">
&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot;&gt;File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''&lt;/div&gt;
<td colspan="2"><div align="center">File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''</div>
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#B5B5B5&quot;&gt;'''''Code'''''&lt;/td&gt;
<td bgcolor="#B5B5B5">'''''Code'''''</td>
&lt;td width=&quot;50%&quot; bgcolor=&quot;#B5B5B5&quot;&gt;'''''Comment'''''&lt;/td&gt;
<td width="50%" bgcolor="#B5B5B5">'''''Comment'''''</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#CCCCCC&quot;&gt;
<td bgcolor="#CCCCCC">


&lt;nowiki&gt;#&lt;/nowiki&gt; This file provides security to the server limiting access to the localhost only.&lt;br&gt;
<nowiki>#</nowiki> This file provides security to the server limiting access to the localhost only.<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Comment to deactivate.&lt;br&gt;
<nowiki>#</nowiki> Comment to deactivate.<br>


&lt;nowiki&gt;#&lt;/nowiki&gt;Order Deny,Allow&lt;br&gt;
<nowiki>#</nowiki>Order Deny,Allow<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;Deny from all&lt;br&gt;
<nowiki>#</nowiki>Deny from all<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;Allow from 127.0.0.1&lt;br&gt;
<nowiki>#</nowiki>Allow from 127.0.0.1<br>
&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#CCCCCC&quot;&gt;
<td valign="top" bgcolor="#CCCCCC">
'''Section 1)''' The last three lines are commented this means they are inactive and not protecting the folder or its sub-folders
'''Section 1)''' The last three lines are commented this means they are inactive and not protecting the folder or its sub-folders


Line 102: Line 101:


Alternatively you could delete all lines in this section the effect would still remain the same.
Alternatively you could delete all lines in this section the effect would still remain the same.
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;/table&gt;
</table>
My real point using just three comments you have put your server online, remove the comments and you are back to square one, its that flexibility I am talking about. Delete the lines next time you wish to use them you may have to look up the format for the commands. Lets look at those three lines in more detail.
My real point using just three comments you have put your server online, remove the comments and you are back to square one, its that flexibility I am talking about. Delete the lines next time you wish to use them you may have to look up the format for the commands. Lets look at those three lines in more detail.


Line 119: Line 118:
Now we make one exception '''Allow''' from port '''127.0.0.1''' this is '''localhost IP adress''' (the PC that Apache is running on)
Now we make one exception '''Allow''' from port '''127.0.0.1''' this is '''localhost IP adress''' (the PC that Apache is running on)


&lt;table style=&quot;background-color:#00ff00&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot;&gt;
<table style="background-color:#00ff00" width="100%" border="0" cellpadding="2" cellspacing="1">
&lt;tr bgcolor=&quot;#A8A8A8&quot;&gt;
<tr bgcolor="#A8A8A8">
&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot;&gt;File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''&lt;/div&gt;
<td colspan="2"><div align="center">File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''</div>
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#B5B5B5&quot;&gt;'''''Code'''''&lt;/td&gt;
<td bgcolor="#B5B5B5">'''''Code'''''</td>
&lt;td width=&quot;50%&quot; bgcolor=&quot;#B5B5B5&quot;&gt;'''''Comment'''''&lt;/td&gt;
<td width="50%" bgcolor="#B5B5B5">'''''Comment'''''</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#CCCCCC&quot;&gt;
<td bgcolor="#CCCCCC">


&lt;nowiki&gt;#&lt;/nowiki&gt; This file provides security to the server limiting access to the localhost only.&lt;br&gt;
<nowiki>#</nowiki> This file provides security to the server limiting access to the localhost only.<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Comment to deactivate.&lt;br&gt;
<nowiki>#</nowiki> Comment to deactivate.<br>


Order Deny,Allow&lt;br&gt;
Order Deny,Allow<br>
Deny from all&lt;br&gt;
Deny from all<br>
Allow from 127.0.0.1&lt;br&gt;
Allow from 127.0.0.1<br>


&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#CCCCCC&quot;&gt;
<td valign="top" bgcolor="#CCCCCC">
'''Section 1)''' The last three lines are uncommented this means they are active and protecting the folder, where .htacces resides and all its sub-folders
'''Section 1)''' The last three lines are uncommented this means they are active and protecting the folder, where .htacces resides and all its sub-folders


a) Execute the next two commands in this order '''Deny''' and the '''Allow'''.&lt;br&gt;
a) Execute the next two commands in this order '''Deny''' and the '''Allow'''.<br>
b) '''Deny from all''' No one allowed access to the Apache server&lt;br&gt;
b) '''Deny from all''' No one allowed access to the Apache server<br>
c) '''Allow from 127.0.0.1''' Localhost is the only exception and allowed access.&lt;br&gt;
c) '''Allow from 127.0.0.1''' Localhost is the only exception and allowed access.<br>
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;/table&gt;
</table>


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 159: Line 158:
To allow execution of scripts you use the following option +ExecCGI the default is –ExecCGI  
To allow execution of scripts you use the following option +ExecCGI the default is –ExecCGI  


&lt;table style=&quot;background-color:#00ff00&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot;&gt;
<table style="background-color:#00ff00" width="100%" border="0" cellpadding="2" cellspacing="1">
&lt;tr bgcolor=&quot;#A8A8A8&quot;&gt;
<tr bgcolor="#A8A8A8">
&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot;&gt;File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''&lt;/div&gt;
<td colspan="2"><div align="center">File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''</div>
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#B5B5B5&quot;&gt;'''''Code'''''&lt;/td&gt;
<td bgcolor="#B5B5B5">'''''Code'''''</td>
&lt;td width=&quot;50%&quot; bgcolor=&quot;#B5B5B5&quot;&gt;'''''Comment'''''&lt;/td&gt;
<td width="50%" bgcolor="#B5B5B5">'''''Comment'''''</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#CCCCCC&quot;&gt;
<td bgcolor="#CCCCCC">
&lt;nowiki&gt;#&lt;/nowiki&gt; To disallow execution of cgi scripts in this directory comment next two lines.&lt;br&gt;
<nowiki>#</nowiki> To disallow execution of cgi scripts in this directory comment next two lines.<br>


AddHandler cgi-script .bat .exe .pl .cgi&lt;br&gt;
AddHandler cgi-script .bat .exe .pl .cgi<br>
Options +ExecCGI&lt;br&gt;
Options +ExecCGI<br>


&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#CCCCCC&quot;&gt;
<td valign="top" bgcolor="#CCCCCC">
'''Section 2)''' Allows scripts execution
'''Section 2)''' Allows scripts execution
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;/table&gt;
</table>




&lt;table style=&quot;background-color:#00ff00&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot;&gt;
<table style="background-color:#00ff00" width="100%" border="0" cellpadding="2" cellspacing="1">
&lt;tr bgcolor=&quot;#A8A8A8&quot;&gt;
<tr bgcolor="#A8A8A8">
&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot;&gt;File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''&lt;/div&gt;
<td colspan="2"><div align="center">File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''</div>
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#B5B5B5&quot;&gt;'''''Code'''''&lt;/td&gt;
<td bgcolor="#B5B5B5">'''''Code'''''</td>
&lt;td width=&quot;50%&quot; bgcolor=&quot;#B5B5B5&quot;&gt;'''''Comment'''''&lt;/td&gt;
<td width="50%" bgcolor="#B5B5B5">'''''Comment'''''</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#CCCCCC&quot;&gt;
<td bgcolor="#CCCCCC">
&lt;nowiki&gt;#&lt;/nowiki&gt; To disallow execution of cgi scripts in this directory comment next two lines.&lt;br&gt;
<nowiki>#</nowiki> To disallow execution of cgi scripts in this directory comment next two lines.<br>


# AddHandler cgi-script .bat .exe .pl .cgi&lt;br&gt;
# AddHandler cgi-script .bat .exe .pl .cgi<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Options +ExecCGI&lt;br&gt;
<nowiki>#</nowiki> Options +ExecCGI<br>


&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#CCCCCC&quot;&gt;
<td valign="top" bgcolor="#CCCCCC">
'''Section 2)''' Comment the lines as shown to disable script execution
'''Section 2)''' Comment the lines as shown to disable script execution
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;/table&gt;
</table>


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 210: Line 209:
The final section of htaccess deals with user name and password protection by default this is disabled. If you have put your servers online (see section 1) anyone on the Internet can view your web site. If you have restricted your server to localhost (default) anyone with access (physical) to your PC can view your web site.  
The final section of htaccess deals with user name and password protection by default this is disabled. If you have put your servers online (see section 1) anyone on the Internet can view your web site. If you have restricted your server to localhost (default) anyone with access (physical) to your PC can view your web site.  


&lt;table style=&quot;background-color:#ff0000&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot;&gt;
<table style="background-color:#ff0000" width="100%" border="0" cellpadding="2" cellspacing="1">
&lt;tr bgcolor=&quot;#A8A8A8&quot;&gt;
<tr bgcolor="#A8A8A8">
&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot;&gt;File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''&lt;/div&gt;
<td colspan="2"><div align="center">File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''</div>
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#B5B5B5&quot;&gt;'''''Code'''''&lt;/td&gt;
<td bgcolor="#B5B5B5">'''''Code'''''</td>
&lt;td width=&quot;50%&quot; bgcolor=&quot;#B5B5B5&quot;&gt;'''''Comment'''''&lt;/td&gt;
<td width="50%" bgcolor="#B5B5B5">'''''Comment'''''</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#CCCCCC&quot;&gt;
<td bgcolor="#CCCCCC">
&lt;nowiki&gt;#&lt;/nowiki&gt;--&lt;br&gt;
<nowiki>#</nowiki>--<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Activate this to use the Private Server Feature!&lt;br&gt;
<nowiki>#</nowiki> Activate this to use the Private Server Feature!<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;--&lt;br&gt;
<nowiki>#</nowiki>--<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; To lock server, uncomment the next 4 lines.&lt;br&gt;
<nowiki>#</nowiki> To lock server, uncomment the next 4 lines.<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Defaults: Username - root; Password - root&lt;br&gt;
<nowiki>#</nowiki> Defaults: Username - root; Password - root<br>


&lt;nowiki&gt;#&lt;/nowiki&gt;AuthName &quot;Uniform Server - Server Access&quot;&lt;br&gt;
<nowiki>#</nowiki>AuthName "Uniform Server - Server Access"<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;AuthType Basic&lt;br&gt;
<nowiki>#</nowiki>AuthType Basic<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;AuthUserFile /htpasswd/www/.htpasswd&lt;br&gt;
<nowiki>#</nowiki>AuthUserFile /htpasswd/www/.htpasswd<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;Require valid-user&lt;br&gt;
<nowiki>#</nowiki>Require valid-user<br>
&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#CCCCCC&quot;&gt;
<td valign="top" bgcolor="#CCCCCC">
'''Section 3)''' Comment to disable user name password access to your web site default setting on installing UniServer.
'''Section 3)''' Comment to disable user name password access to your web site default setting on installing UniServer.
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;/table&gt;
</table>


Uncomment the last four lines to enable password protection. Any user trying to view your web site will be requested to enter a name and password. This is the name/password pair you entered for your personal server.
Uncomment the last four lines to enable password protection. Any user trying to view your web site will be requested to enter a name and password. This is the name/password pair you entered for your personal server.
Line 242: Line 241:
Please note this section is independent of the settings in section one hence authentication will be required.
Please note this section is independent of the settings in section one hence authentication will be required.


&lt;table style=&quot;background-color:#00ff00&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot;&gt;
<table style="background-color:#00ff00" width="100%" border="0" cellpadding="2" cellspacing="1">
&lt;tr bgcolor=&quot;#A8A8A8&quot;&gt;
<tr bgcolor="#A8A8A8">
&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot;&gt;File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''&lt;/div&gt;
<td colspan="2"><div align="center">File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''</div>
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#B5B5B5&quot;&gt;'''''Code'''''&lt;/td&gt;
<td bgcolor="#B5B5B5">'''''Code'''''</td>
&lt;td width=&quot;50%&quot; bgcolor=&quot;#A8A8A8&quot;&gt;'''''Comment'''''&lt;/td&gt;
<td width="50%" bgcolor="#A8A8A8">'''''Comment'''''</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#CCCCCC&quot;&gt;
<td bgcolor="#CCCCCC">
&lt;nowiki&gt;#&lt;/nowiki&gt;--&lt;br&gt;
<nowiki>#</nowiki>--<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Activate this to use the Private Server Feature!&lt;br&gt;
<nowiki>#</nowiki> Activate this to use the Private Server Feature!<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;--&lt;br&gt;
<nowiki>#</nowiki>--<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; To lock server, uncomment the next 4 lines.&lt;br&gt;
<nowiki>#</nowiki> To lock server, uncomment the next 4 lines.<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Defaults: Username - root; Password - root&lt;br&gt;
<nowiki>#</nowiki> Defaults: Username - root; Password - root<br>


AuthName &quot;Uniform Server - Server Access&quot;&lt;br&gt;
AuthName "Uniform Server - Server Access"<br>
AuthType Basic&lt;br&gt;
AuthType Basic<br>
AuthUserFile /htpasswd/www/.htpasswd&lt;br&gt;
AuthUserFile /htpasswd/www/.htpasswd<br>
Require valid-user&lt;br&gt;
Require valid-user<br>


&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#CCCCCC&quot;&gt;
<td valign="top" bgcolor="#CCCCCC">
'''Section 3)''' Uncomment last four lines as shown to enable user name password protection.
'''Section 3)''' Uncomment last four lines as shown to enable user name password protection.


&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;/table&gt;
</table>
The first line AuthName &quot;Uniform Server - Secure Server Access&quot; contains text that is displayed in the authentication required pop-up window, change this to match your web site.
The first line AuthName "Uniform Server - Secure Server Access" contains text that is displayed in the authentication required pop-up window, change this to match your web site.


[[Image:Uc_password.gif]]
[[Image:Uc_password.gif]]
Line 285: Line 284:
The complete htaccess file is shown below. It is currently configure to allow localhost access (section 1), to run cgi scripts (section 2) and require user authentication (section 3).
The complete htaccess file is shown below. It is currently configure to allow localhost access (section 1), to run cgi scripts (section 2) and require user authentication (section 3).


&lt;table style=&quot;background-color:#00ff00&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot;&gt;
<table style="background-color:#00ff00" width="100%" border="0" cellpadding="2" cellspacing="1">
&lt;tr bgcolor=&quot;#A8A8A8&quot;&gt;
<tr bgcolor="#A8A8A8">
&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot;&gt;File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''&lt;/div&gt;
<td colspan="2"><div align="center">File '''.htaccess''' Located in folder '''*\Uniform Server\udrive\www'''</div>
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#B5B5B5&quot;&gt;'''''Code'''''&lt;/td&gt;
<td bgcolor="#B5B5B5">'''''Code'''''</td>
&lt;td width=&quot;50%&quot; bgcolor=&quot;#A8A8A8&quot;&gt;'''''Comment'''''&lt;/td&gt;
<td width="50%" bgcolor="#A8A8A8">'''''Comment'''''</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#CCCCCC&quot;&gt;
<td bgcolor="#CCCCCC">
&lt;nowiki&gt;#&lt;/nowiki&gt; This file provides security to the server limiting access to the localhost only. &lt;br&gt;
<nowiki>#</nowiki> This file provides security to the server limiting access to the localhost only. <br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Comment to deactivate.&lt;br&gt;
<nowiki>#</nowiki> Comment to deactivate.<br>


Order Deny,Allow&lt;br&gt;
Order Deny,Allow<br>
Deny from all&lt;br&gt;
Deny from all<br>
Allow from 127.0.0.1&lt;br&gt;
Allow from 127.0.0.1<br>
&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#CCCCCC&quot;&gt;
<td valign="top" bgcolor="#CCCCCC">
'''Section 1)''' To put your servers online comment the last three line in this section.
'''Section 1)''' To put your servers online comment the last three line in this section.


The default setting is for localhost access, you can remain connected to the Internet only your local browser will be able to view and access your web-site server.
The default setting is for localhost access, you can remain connected to the Internet only your local browser will be able to view and access your web-site server.
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#dadada&quot;&gt;
<td bgcolor="#dadada">
&lt;nowiki&gt;#&lt;/nowiki&gt; To allow execution of cgi scripts in this directory uncomment next two lines.&lt;br&gt;
<nowiki>#</nowiki> To allow execution of cgi scripts in this directory uncomment next two lines.<br>


AddHandler cgi-script .pl .cgi&lt;br&gt;
AddHandler cgi-script .pl .cgi<br>
Options +ExecCGI&lt;br&gt;
Options +ExecCGI<br>
&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#dadada&quot;&gt;
<td valign="top" bgcolor="#dadada">
'''Section 2)''' The default is to allow execution of scripts.
'''Section 2)''' The default is to allow execution of scripts.


If you do not runs CGI scripts comment out the last two lines in this section.
If you do not runs CGI scripts comment out the last two lines in this section.
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;tr&gt;
<tr>
&lt;td bgcolor=&quot;#CCCCCC&quot;&gt;
<td bgcolor="#CCCCCC">
&lt;nowiki&gt;#&lt;/nowiki&gt;--&lt;br&gt;
<nowiki>#</nowiki>--<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Activate this to use the Private Server Feature!&lt;br&gt;
<nowiki>#</nowiki> Activate this to use the Private Server Feature!<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;--&lt;br&gt;
<nowiki>#</nowiki>--<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; To lock server, uncomment the next 4 lines.&lt;br&gt;
<nowiki>#</nowiki> To lock server, uncomment the next 4 lines.<br>
&lt;nowiki&gt;#&lt;/nowiki&gt; Defaults: Username - root; Password - root&lt;br&gt;
<nowiki>#</nowiki> Defaults: Username - root; Password - root<br>


&lt;nowiki&gt;#&lt;/nowiki&gt;AuthName &quot;Uniform Server - Server Access&quot;&lt;br&gt;
<nowiki>#</nowiki>AuthName "Uniform Server - Server Access"<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;AuthType Basic&lt;br&gt;
<nowiki>#</nowiki>AuthType Basic<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;AuthUserFile /htpasswd/www/.htpasswd&lt;br&gt;
<nowiki>#</nowiki>AuthUserFile /htpasswd/www/.htpasswd<br>
&lt;nowiki&gt;#&lt;/nowiki&gt;Require valid-user&lt;br&gt;
<nowiki>#</nowiki>Require valid-user<br>
&lt;/td&gt;
</td>
&lt;td valign=&quot;top&quot; bgcolor=&quot;#CCCCCC&quot;&gt;
<td valign="top" bgcolor="#CCCCCC">
'''Section 3)''' For a personal web server the last four lines have been uncommented. To access your web site a user must supply coreect user name and password.
'''Section 3)''' For a personal web server the last four lines have been uncommented. To access your web site a user must supply coreect user name and password.


To disable this comment the last four lines. This allows every one access with the restriction set in section 1)
To disable this comment the last four lines. This allows every one access with the restriction set in section 1)
&lt;/td&gt;
</td>
&lt;/tr&gt;
</tr>
&lt;/table&gt;
</table>
   
   
'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''