Top Nav

Archive | Plesk

Canonical Rewrite Built-in To Plesk 11.5

There’s a cool new feature in Plesk ll.5 that provides a “canonical rewrite rule” that you can turn on off from the panel. To find the setting, login to Plesk, drill down on your domain and go to:

Websites & Domains -> Hosting Settings

plesk115crw1

 

Notice the “Preferred domain” field.

plesk115crw3

 

There are three options for this field:

“None” – do nothing

domain.tld” – redirect to remove the www

www.domain.tld” -redirect to add the www

Just set this field to your preference and Plesk will configure the appropriate rewrite rule in Apache.

 

2

WordPress Multi-site On Plesk

It’s easy to setup WordPress in multi-site mode on Plesk.

Let’s assume you want to map:

to your multi-site installed on “acme.com”.

From an SSH login on the server, just edit the file:

If the file does not exist then create a new empty file.

Add the following line to the top of the file:

Save the file and tell plesk to reconfigure:

Now restart Apache:

Now you’re ready to go with multi-site.

There’s an article here that addresses subdomain and webmail issues:

https://codex.wordpress.org/Configuring_Wildcard_Subdomains_for_multi_site_under_Plesk_Control_Panel

0

Add Google Apps DNS Records To Domain On Plesk From Command Line

Here’s the command line steps to add Google Apps to a domain under Plesk:

0

Block PHP Execution With .htaccess In Folder

For a server using Plesk add the following lines to a .htaccess file to stop execution of PHP scripts in the folder:

I like to use this to protect cache and image upload folders that are writable by the web server but should not be able to execute code.

As a further precaution, chown the .htaccess to root, so it can’t be overwritten by Apache or FTP, and “chattr +i” to be sure about it.

1