Halaman

Selasa, 14 April 2015

Recursively chmod only on directories or files

A Very simple neat trick to chmod the directories/files
chmod 755 $(find /path/to/base/dir -type d)
and
chmod 644 $(find /path/to/base/dir -type f)
alternative: executing one by one, instead..
for files:
sudo find . -type f -exec chmod 644 {} \;
for directories
sudo find . -type d -exec chmod 755 {} \;
And if you are using that chmod, you are likely using that for your web server. Don't forget to install suPHP on apache, and then setup the configuration at /etc/suphp/suphp.conf and on your virtual host(s) add the 
php_admin_flag engine off
suPHP_Engine on

or perhaps using the fast-cgi approach

Cheers! :D

Setup Wildcard SubDomain on local computer


  1. Install Bind
  2. Install Webmin
  3. Configure server using webmin
    1. check if webmin service is run by running sudo service webmin start
    2. browse to the http://{YOUR_IP or LOCALHOST}:10000
    3. enter your root / sudoer account password
      1. Configure the bind service
        1. Forwarding and Transfer
          1. Enter google dns servers (8.8.8.8, 8.8.4.4)
      2. Configure the server (Servers >> Existing DNS Zones), if this is not shown, use the following command to install the bind-server:
        sudo apt-get install bind9 bind9utils bind9-doc and then refresh the modules on webmin
        1. Create master zone
        2. Domain name: enter your domain, example domain.do
        3. Email address: enter your valid email address format
        4. Edit master zone domain.do
          1. Name: domain.do
            Address: 127.0.0.1
          2. Name: *.domain.do
            Address: 127.0.0.1
        5. try to ping domain.do it should returns 127.0.0.1
If you are receiving a 503 error, try to change the directory mode to 0755 and the file to 0644
It is also important to put index.php (indexes file) on your root.
Don't forget to also add the directory to the list of accessible directory by Apache, **see the Apache configuration files**

:) Cheers!