ABHIONLINUX
Site useful for linux administration and web hosting

2011/01/22

Linux Plesk Back end files.

Plesk root directory :  /usr/local/psa
Plesk version          :  /usr/local/psa/version
Plesk Admin pass    :  /etc/psa/.psa.shadow
Plesk conf file         : /etc/psa/psa.conf
Apache conf           : /etc/httpd/conf/httpd.conf
Plesk apache startup script  : /usr/local/psa/admin/bin/httpsdctl start
Apache log files      : /var/log/http/
Php conf                :  /etc/php.ini
Named conf           : /var/named/run-root/etc/named.conf
Named db              : /var/named/run-root/var/domainname
Log                       : /var/log/messages
Names restart         : /etc/init.d/named restart
Mysql Db location  : /var/lib/mysql
Mysql conf            : /etc/my.cnf
Mysql log              : /var/log/mysql.log
Plesk qmail            : /var/qmail
Mail Dir for domain: /var/qmail/mailnames/domainname
Maillog                  : /var/log/maillog
Plesk home dir       : /var/www/vhosts/domain.com
Plesk Doc root       :  /var/www/vhost/domainname/httpdocs
Subdomain Docroot:  /var/www/vhost/domainname/subdomain
Domain specific log: /var/www/vhosts/domainname/statistics/logs


Plesk Db:
Plesk database is called psa. Admin logins are used to access psa db.

Following are the tables in psa db
1. Domains

2. Clients
3. db_users
4. db_bases
5. disk_spaces
6. mail
7. lockout
8. web_users

2011/01/14

Move worpress site from subfolder to root

Assume that wordpress is installed in /blog folder and root domain is abhionlinux.co.cc
You can follow the steps below to move the blog to root dir.

1. Backup the folder /blog , this is done as  a precaution.
2. Copy all the files in blog to root dir, make sure .htaccess file is also copied. There shouldnt be any index files such as index.php or index.html.
3. Add the following line in wp-config.php under root dir.


define('RELOCATE',true);

4. Open the URL abhionlinux.co.cc/wp-login.php and enter the admin login details.
5. Go to general settings, Make sure  in wordpress address field  you have abhionlinux.co.cc(root dir) and make blog address URL as abhionlinux.co.cc(root dir). Most likely it will be having
http://abhionlinux.co.cc/blog, dont leave '/' in domain name.
6. Check htaccess in root dir and make sure it is similar to the one given below.
====================
IfModule mod_rewrite.c
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
IfModule
===================

Now your wordpress site is move from subfolder to root dir. 
7. You can remove the line below from the file wp-config.php

define('RELOCATE',true);

Try it out !!!



2011/01/13

Moodle : ERROR: Could not find or create a directory (/home/username/public_html/uploaddata/16)

After creating the course, when you try to add files/folders in the course you will get an error "ERROR: Could not find or create a directory (/home/username/public_html/uploaddata/16"

This is due permission/ownership issue/.
Make sure that all your files and folders are having correct  ownership (username.username)
Check the permission for /uploaddata/, this should be set to 777.

Unable to login to Moodle site "Your session has timed out. Please login again"

When you try to login to your Moodle admin section,  you will get an error showing "Your session has timed out. Please login again"

Fix:
Check whether the folder /uploaddata/sessions/ is having 777 permission.
Clear all the session files in this folder.

Then you will be able to login to your website.