≡ Menu

Latest in Apache

Tutorials, howtos, and general web server security & optimization tips about Apache web server under Linux and Unix like operating systems.

One of my php script called setoptions.php is hosted on my new vps server. However, it is not working so I setup php error log as described here and, and I see the following warning repeated in my log file:

PHP Warning: fread(): Length parameter must be greater than 0 in /var/www/html/scripts/setoptions.php on line 311

The line no # 311 is as follows in my php script:
$fname = 'myappconfig.php';
$content = fread($fhandle,filesize($fname));

How do I fix this problem under Unix/Apache/php5 server?
[click to continue…]

How do I replace upstream "Location: http://server1.cyberciti.biz:8080/app/" http/301 response-header with "Location: http://www.cyberciti.biz/app/" in the response of the proxied server using nginx?
[click to continue…]

How do I set readonly permission for all files stored in /var/www/html directory?
[click to continue…]

I'm running nginx as a frond end to php based Apache+mod_fastcgi server. My app lets user upload images upto 2MB in size. When users trying to upload 1.5MB+ size image file using nginx reverse proxy, they are getting the following error on screen:

Nginx 413 Request Entity Too Large

How do I fix this problem and allow image upload upto 2MB in size using nginx web-server working in reverse proxy or stand-alone mode on Unix like operating systems?
[click to continue…]

HowTo: Install Ports in Freebsd

How do I install ports in FreeBSD operating systems using the command line options?
[click to continue…]

UNIX / Linux: Rsnapshot Restore Backups

I've created the backup server using this tutorial under Redhat and Debian Linux systems. How do I restore files (such as /var/www/html) with rsnapshot backup tool? How do I restore MySQL database dumps with rsnapshot under UNIX or Linux operating systems?
[click to continue…]

Bash String Concatenation

How do I join two strings under BASH? I have two strings stored in two different variables (_p=/delta and _u=aqua) and how do I join this and assign it to another variable in bash?
[click to continue…]