#vim /etc/yum.conf
#add the following line
throttle=50k
It will limit the speed 50KB/S while installing the package from the online repo using yum
######### Creating a Passowrd Protected Website #################
1. Create your default website and check its working on browswer
When the website is working
2. Create a htpasswd file in /etc/httpd/conf/
[root@dhcppc9 conf]# htpasswd -c .htpasswd mind
New password:
Re-type new password:
Adding password for user mind
3. Set .htpasswd file permission 0644 so that it is accessed to apache user and group of apache server.
chmod 0644 .htpasswd
4. Now create .htaccess file in your document root where the website is placed (/var/www/html/site1)
#vim /var/www/html/site1/.htaccess
Now paste the following lines in this file
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /etc/httpd/conf/.htpasswd -- path of htpasswd file
require valid-user
5. set permission 0644 to this file so that it is access to apache user and group.
[root@dhcppc9 conf]# chmod 0644 /var/www/html/site1/.htaccess
6. Now open httpd.conf file and paste the following lines in your virutal host
<Directory "/var/www/html/site1"> --- path of your document root
AllowOverride AuthConfig
# The Options below is an example. Use what you deem is necessary.
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Order allow,deny
Allow from all
</Directory>
7. Service httpd restart
alias vi=vim
Now restart the terminal