Useful Find Examples

Find all HTML files that contain the text “Loading”

# find . -name *.html -exec grep -il "Loading" {} \;

Find all files modified in last 7 days

# find . -mtime -7

Find all .PHP files modified in last 7 days

# find . -name *.php -mtime -7

Find and Remove all PHP files modified in last 7 days

# find . -name *.php -mtime -7 | xargs rm

Find all  files modified in last 10 days that contain text “Loading” and move to /trash

# find . -type f -mtime -10 -exec egrep -l "Loading" {} \; -exec mv -f {} /trash \;

How to test CGI is working with a ‘Hello World’ script

How to get CGI working on Plesk 11

Running CGi and Perl scripts is not as straightforward as PHP, so in order to get your CGI working, ensure to confirm the following steps. Once the file in in the correct location, and the file system permissions are correct you will be good to go.

1) Ensure Perl-CGI is installed on the server. If you host with us, this is already done for you.

# yum install perl-CGI

2) Ensure Perl/CGI is enabled for your domain name in your Plesk panel. Find the domain name in the Plesk panel and look at the ‘Website Sripting and Security’ section.

3) Create a file named ‘hello.cgi’ with the following contents:

#!/usr/bin/perl
print("Content-type: text/plain\n");
print("\n");
print("Hello World!\n");

4) Ensure your file is uploaded to /cgi-bin and not /httpdocs/cgi-bin

5) Ensure your file permissions on the file are 755, you can set this in your FTP application or File Manager

6) You can now execute the file as such: http://www.mydomain.co.uk/cgi-bin/hello.cgi

Hello World!

How to add another domain to your Plesk 11 hosting account

Adding another domain to your Plesk 11 Hosting Account

You can host multiple web sites with your Plesk 11 account. The limit is set to your hosting plan, current we support hosting up to 50 sites per account.

To host another domain name in your Plesk 11 hosting account please do the following:

1) Login to your Client Management Portal
2) Select Services > My Services then View Details of your Hosting Account
3) Click “Login to Plesk Control Panel”
4) Click “Add Domain”
5) Enter your new domain name to host eg. iveriaternaartwork.co.uk
6) Keep the “Use our DNS Settings” and “Hosting Type” as the defaults suggest
7) A default document root will be provided eg /site1
8) You can now FTP your new website using your FTP username and password with document root set to /site1
9) Ensure your new domain name is set to the same name servers as your primary domain name to connect the domain to your hosting server.

If you have any problems do not hesitate to contact us.

How to Reconfigure One Domain With Plesk httpdmng

Plesk administrator command

Use httpdmng to regenerate one domain’s web-server configuration after validating the source settings

This command requires root access and is not for UKC shared-hosting customers. Plesk Obsidian uses httpdmng to rebuild generated Apache and nginx configuration for a domain. Correct invalid custom directives first, back up relevant configuration and reconfigure only the affected domain.

ACCESSRoot onlyServer administrators
SCOPEOne domainLimit the change
FIRSTValidate directivesDo not hide the cause

When is a single-domain reconfiguration appropriate?

Custom directives changed

You corrected a domain-specific Apache or nginx directive and need Plesk to regenerate its active configuration.

Generated files are stale

The Plesk source settings are correct but the generated virtual-host configuration no longer matches them.

One domain is affected

Other subscriptions work and the evidence points to one virtual host, so a server-wide rebuild would be unnecessarily broad.

Not a content fix

httpdmng does not repair PHP code, WordPress, DNS, certificates or an incorrect document root selected in the application.

Administrator procedure

  1. 1
    Capture the failure

    Save the exact domain, Plesk action, configuration-test output and relevant log lines before changing anything.

  2. 2
    Back up custom configuration

    Copy the domain’s custom vhost and nginx directives and confirm the intended values in Plesk.

  3. 3
    Reconfigure one domain

    Run the supported Plesk utility with the exact domain name:

    /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain <domain_name>
  4. 4
    Review the result

    Read command output, run web-server configuration tests and inspect newly generated files and service logs.

Post-change checks

CheckExpected result
HTTP and HTTPSThe correct website answers on both schemes and redirects only as intended
CertificateThe requested hostnames are covered and no mismatch is shown
PHP handlerThe domain uses the configured version and handler without gateway errors
LogsNo new syntax, upstream or permission error appears during a test request
Other domainsUnrelated subscriptions continue operating normally

Plesk applies changes made through Web Server Settings automatically in normal use. Manual httpdmng execution is primarily a recovery or advanced-administration step.

httpdmng questions

Should I reconfigure all domains?

Not when the issue is isolated. Start with the smallest supported scope and expand only when evidence shows a wider generation problem.

Will the command overwrite custom files?

Plesk regenerates derived configuration from its source settings and supported custom directive files. Back those up and understand which layer is authoritative before running it.

What if it reports an error?

Do not repeatedly rerun it. Correct the named directive, missing resource or source setting, then test again.

Keep the repair narrow

Validate first, reconfigure once and inspect the generated result

If this is a UKC shared-hosting domain, send the evidence to support instead of using server commands.