Category Archives: Web

Nginx userdir with php

implement userdir with php in nginx Continue reading

Posted in Web | Tagged , , | Leave a comment

nginx – try files on multiple named location or server

Let’s start from the simplest case: How to serve files locally first, and proxy the request to other backend/internal server if not found? listen 192.168.1.10:80; … location /static/ { try_files $uri @static_svr1; } location @static_svr1{ proxy_pass http://192.168.1.11$uri; } That’s simple! … Continue reading

Posted in System Administration, Web | Tagged , , , , | 2 Comments

peek the source – Another troubleshooting method for open source software

Today I read a security article on the nginx fastcgi PATH_INFO (Chinese version on 80sec). I currently maintain several sites with nginx+php-fpm, so I decide to do some test and see if my configuration is in danger. However, when I … Continue reading

Posted in Security, Web | Tagged , , , , | Leave a comment

Apache options directive trap

When configuring the Apache HTTP server, we use the Options directive to control which server features are available in a particular directory. We may, for example, write a config like this: <Directory /usr/share/nagios> Options +ExecCGI Indexes FollowSymLinks … </Directory> With … Continue reading

Posted in System Administration, Web | Tagged , | Leave a comment

php security: disable functions

Case Study: Some small hosting company provides web hosting service to its clients. The machine runing web server also acts as an email server, which function very well. Then one day, one of its client wrote some php scripts, which … Continue reading

Posted in Email, Security, System Administration, Web | Tagged , , , | Leave a comment

Intall multiple version of php on one server

This article is about how to install php-5.1, php-5.2 and php-5.3 on one server, and use them simultaneously Based on CentOS 5.6, for Apache only 1. Enable rpmforge and epel yum repository wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm sudo rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm … Continue reading

Posted in System Administration, Web | Tagged , , , , , | 21 Comments