Category: Webservers

Apache Watch Script

Here’s a trivial old script that I sometimes use to monitor for rough processes running on the apache user:

 

Read More »

Plesk 11 – vhost.conf File For Nginx

We’re all familier with using a vhost.conf file on Plesk to provide custom Apache directives to an individual virtual host. Originally the file was located at:

Recent versions of Plesk have moved the file to:

And of course there is an SSL version of the file at:

The good news is there’s also now a file for Nginx at:

By default these files don’t exist and are not included in the configuration. So you’ll need to create the file and then run:

or

 

Read More »

Generate Rewrite Rules From CSV File

Here’s a simple Perl script that can be used to convert a CSV file of redirects into Apache rewrite rules:

The script assumes that you have 2 column – the source URL and the destination URL. You might invoke the script like this:

Sometimes the CSV file will be DOS formatted to I’ll do:

There are may ways that this script could be expanded or improved but it’s a good starting point for the typical case.

Read More »

Increase Nginx Upload Limit On Server With Plesk Panel

From the Plesk Panel you can set the PHP upload_max_filesize at Website & Domains -> PHP Setting. But if you’re using Nginx then you may also need to configure Nginx to allow larger uploads. We saw errors like this in the /var/log/nginx/error_log:

To resolve the issue edit /etc/nginx/nginx.conf and set client_max_body_size by adding the highlighted line:

 

Read More »

Lightweight 404 For Apple Touch Icons

Had a site recently that was complaining about bandwidth consumed by request for apple-touch-icon* files as described here: http://mathiasbynens.be/notes/touch-icons The customized 404 page on the site was using about 55K bytes for each request. I added the following rewrite rule:

This results in about 500 bytes per request or a 100 fold reduction. Of course a nicer solution would be add pretty touch icons to the site!    

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.