Tuesday, November 19, 2013

Wordpress multisite with subdomains under PLESK 10.4

I have wordpress multisite (network of Wordpress) running in subdomain mode. The main site is abc.net and the sub-blog has its own domain name xyz.com. How to configure that under PLESK 10.4?
  1. Create a WP network with subdomains following the instructions.
  2. Creat a new subdomain called site1.abc.net. Note its ID. In my case, ID=2.
  3. Download and network enable the plugin Wordpress MU Domain Mapping.
  4. Use this plugin to map the subdomain ID=2 to xyz.com
  5. Enable the subdomain wildcards under PLESK (under abc.net, add a subdomain named *.abc.net, pointing to the same directory that hosts the WP network installation (in my case, /httpdocs). After this step, site1.abc.net is available.
  6. If you want the subplog to have its own DN rather than site1.abc.net, follow the steps below:
  7. Purchase a DN and point it to the DN server that manages the server hosting the WP network (and that has PLESK).
  8. Under PLESK, chose the webspace of the main domain (abc.net), chose "Website & Domains" and chose "Add New Domain Alias", enter xyz.net as an alias to abc.net.
  9. WP MU Domain Mapping Plugin takes care of the rest.

Now my subblog has its own domain name! Yippie!

Monday, November 18, 2013

How to add a wildcard subdomain under PLESK (v10.4 and others)

Instructions given at : http://kb.parallels.com/en/2239

basically I created a new subdomain under PLESK called *.xxxinstitute.net that points to /httpdocs and voila....

Tuesday, November 5, 2013

Time-based interpolation

Interpolating time-based data that has NAs :

http://stackoverflow.com/questions/7188807/interpolate-na-values

Alt-Tab windows switching groups windows in Ubuntu 12.10. How to disable?

  sudo apt-get install compiz-plugins compizconfig-settings-manager

  1. Disable the keyboard shortcuts for Unity's switcher by unchecking CompizConfig Settings Manager ▸ Desktop ▸ Ubuntu Unity Plugin ▸ Switcher ▸ Key to start the switcher ▸ Enabled and Key to start the switcher in reverse ▸ Enabled
  2. Enable the Static Application Switcher by checking CompizConfig Settings Manager ▸ Window Management ▸ Static Application Switcher ▸ Enable Static Application Switcher

Limiting sftp accounts with chroot

from http://www.techrepublic.com/blog/linux-and-open-source/chroot-users-with-openssh-an-easier-way-to-confine-users-to-their-home-directories/

#In the file /etc/ssh/sshd_config  :
#make sure the sftp subservice is defined with the line (only once)
Subsystem sftp /usr/lib/openssh/sftp-server

# add the following lines (only once)
Match Group sftp
    ChrootDirectory %h
    ForceCommand internal-sftp
    AllowTcpForwarding no

#Then on the linux shell, create the sftp group (only once)
sudo addgroup sftp

#Create the user and set its properties (for each sftp user)
sudo adduser joe
sudo usermod -G sftp joe
sudo usermod -s /bin/false joe
sudo chown root:root /home/joe
sudo chmod 0755 /home/joe
sudo usermod -G sftp joe
sudo mkdir /home/joe/Data
sudo chown -R joe:joe /home/joe/Data

The usermod command above will add user joe to the sftp group and set their shell to /bin/false so they absolutely cannot ever get shell access. The chown and chmod commands will set the required permissions for the directory. With these permissions set, the user will be allowed to upload and download files, but cannot create directories or files in the root directory. In other words, if this is used for Web hosting, ensure that a subdirectory in the root directory, such as /home/joe/public_html/ is available and owned by the user; this way they can write to and create directories in /home/joe/public_html/, but cannot make changes to the root directory (/home/joe), itself.

Monday, November 4, 2013

Disabling ProFTP service under Parralels PLESK


Edit the file /etc/xinetd.d/ftp_psa and set

        disable         = yes

Note that the process will have to repeated when PLESK will be upgraded :(

Disabling openssh/sftp service

Edit and comment out the line :

Subsystem sftp /usr/lib/openssh/sftp-server

and restart the openssh server

sudo restart ssh (or sudo /etc/init.d/ssh restart)