folder permission

----

Edit /etc/httpd/conf.d/awstats.conf

Alias /awstats/icon/ /var/www/awstats/icon/  ScriptAlias /awstats/ /var/www/awstats/ <Directory /var/www/awstats/>         DirectoryIndex awstats.pl         Options ExecCGI         order deny,allow         allow from all </Directory>  Alias /awstatsclasses "/var/www/awstats/lib/" Alias /awstats-icon/ "/var/www/awstats/icon/" Alias /awstatscss "/var/www/awstats/examples/css"

Setting File System Permissions

$ find ./awstats -type d -exec chmod 701 '{}' \;

$ find ./awstats -not -type d -exec chmod 404 '{}' \;

Apache doesn't need direct access to AWStats configuration files therefore we can secure them tightly and not affect the relationship between them. To ensure that your .htaccess files are not readable via browser:

chmod 400 /etc/awstats/*.conf

Protecting The AWStats Directory With And Adding .htaccess

find ./awstats -type d -exec chmod 701 '{}' \;

find ./awstats -not -type d -exec chmod 404 '{}' \;

Now that our folders have been secured, we'll need to create the .htpasswd.users file. Go to the /etc/awstats folder and execute the following command:

htpasswd -c /etc/awstats/htpasswd.users user

vi .htaccess

An alternate method of creating a .htaccess file is using the Htaccess Password Generator. Add the following content to your newly created .htaccess file:

AuthName "STOP - Do not continue unless you are authorized to view this site! - Server Access" AuthType Basic AuthUserFile /etc/awstats/htpasswd.users Require valid-user htpasswd -c /etc/awstat/htpasswd.users awstats_online

Once done, secure the .htaccess file by typing:

chmod 404 awstats/.htaccess

       

                      ----------------------------------X-------------------------------------------

# mkdir /var/www/html/rainloop

# cd /var/www/html/rainloop

# curl -s http://repository.rainloop.net/installer.php | php

# find . -type d -exec chmod 755 {} \;

# find . -type f -exec chmod 644 {} \;

# chown -R apache:apache .

Create a configuration file for Apache.

# vim /etc/httpd/conf.d/20-rainloop.conf          [ Add this Line]

               --------------------------------

Alias /mail /var/www/html/rainloop

<Directory /var/www/html/rainloop>

    Options -Indexes

    AllowOverride All

</Directory>

<Directory /var/www/html/rainloop/data>

    Order Deny,Allow

    Deny from All

</Directory>

---