`
sillycat
  • 浏览: 2543733 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Linux Server Deployment(III)Apache and Perl

阅读更多
Linux Server Deployment(III)Apache and Perl

It is easy to install apache perl mod on ubuntu with apt-get install. I will try on linux.
It is almost the same configuration on Ubuntu.

1. configure the date
And I realized that the date is wrong on the server. So I try this to change it.
syntax:
# date {mmddhhmiyyyy.ss}
mm-- month
dd----- day
hh----- hour
mi----- minites
yyyy-- year
ss------ seconds
>date 062114342011.10

2. configure apache to auth the username/password
require this module mod_auth

find the configuration file, on my system is default.
>vi /etc/apache2/sites-available/default
<Directory /var/www/>
         Options Indexes FollowSymLinks MultiViews +Includes
         #AllowOverride None
         AllowOverride authconfig
         Order allow,deny
         allow from all
         AddType text/html .shtml
         AddOutputFilter INCLUDES .shtml
</Directory>

create a configuration file under the directory you want to put auth in.
>vi /var/www/.htaccess
AuthName               "sillycat"
AuthType                  basic
AuthUserFile          /etc/apache2/valid.txt
require                      valid-user

generate the password files
>htpasswd -bc /etc/apache2/valid.txt username1 password1
>htpasswd -b /etc/apache2/valid.txt username2 password2

3. Restart the apache server
>/etc/init.d/apache2 restart

4. Others
We need to put all the .htaccess files to all the soft link directories. We can also benefit from the auth.


references:
http://blog.opendigest.org/show-428-1.html
http://blog.csdn.net/tenfyguo/archive/2011/01/27/6167190.aspx

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics