Yes a Major update!

Well a few people – not many but a few – will have noticed that the blog has been updated! Nice funky WordPress implementation and https! And it works on Mobile!!!!. I also have about 10 years worth of old blog articles that are still available hear. https://gingercatsoftware.com/Blog.php
In addition to all of this I will also be reviewing all of those articles (over time) and re issuing / updating them via this WordPress format, as well of course as adding lots of new articles.

Thanks for visiting and enjoy the new look and feel. Hear are a couple of  additional articles I wrote at the end of last year.

Linux / Unix stuff

Notes on nginx config

Cheers

Steve

 

Nasty probing http traffic and how to block it!

Ubuntu CLI machine and pi

 

So I notice the ethernet light on my wee server popping away… I check out the logs and notice something attacking my server. Ah a rather stupid brut force hack attempt. Some automated piece of (Sh!T) digital pollution – Grrrrrrr!

There is nothing quite as satisfying as watching a log go quite after executing something like.

sudo iptables -A INPUT -s NASTYIPASSRESSHEAR -j DROP

ie

sudo iptables -A INPUT -s 10.0.0.0 -j DROP

Simple and effective!

Linux / Unix stuff

City Melbourne Australia

Just some occasional unix / linux CLI related notes

To add a .txt to the end of a number of files in a directory

for file in report_*; do mv “$file” “${file}.txt”; done

for f in * ; do mv “$f” “$f.txt” ; done

To delete every file in a directory that does not end in .txt

sudo find . -type f ! -name ‘*.txt’ -delete

Notes on nginx config

screen-shot-2016-10-05-at-12-32-46-am

 

This is just a collection of nginx config notes I’ll up date it on occasion… So with out further ado!
_________________

Getting upload problems
When using the old uploader you may get
“413 Error: Request Entity Too Large”

Mod the nginx.conf file

add/increase client_max_body_size in the nginx configuration file http area/section:
http {
client_max_body_size 32m;
(other lines will also be here)
}

Also look at the php.ini file
/etc/php5/fpm directory if your using php-fpm

php.ini

Check and/or increase the following:
upload_max_filesize = 32M
post_max_size = 32M

Optionally increase:
max_execution_time =300
max_input_time=300
memory_limit =128M

_________________

If the server is not generating php pages

add the follwoing line to fastcgi_params within the /etc/nginx directory

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;

restart both nginx and php5-fpm

__________________________

The “server_names_hash_bucket_size error”

To fix this issue add this line

server_names_hash_bucket_size  64;

or

server_names_hash_bucket_size  128;

into the

/etc/nginx/nginx.conf file 

after the http Declaration

http {

##

# Basic Settings

##

server_names_hash_bucket_size  64;

 …..

That should fix things!

______________________________

Feb 10 2017

Added this to

/etc/nginx/nginx.conf

fix file size up load issue that became apparent in new WordPress install

        # set client body size to 10M #

        client_max_body_size 10M;