跳至主要内容

博文

目前显示的是标签为“apache2”的博文

how to set up a squid for apache.

I find a good tutorial and this may be useful lately. http://www.howtoforge.com/how-to-set-up-a-caching-reverse-proxy-with-squid-2.6-on-debian-etch the important is do not cache the login user page, but only cache the anonimouse users page. This is alos ok for spoop.fr.

apache .htaccess form some file or one file:

见: Satisfy any Order allow,deny Deny from all Allow from 127.0.0.1 AuthType Basic AuthName "private" AuthUserFile /var/www/phpexperts.pro/.htpasswd AuthGroupFile /dev/null Require valid-user IP Alone: Order allow,deny Deny from all Allow from 127.0.0.1 但是我这样做不行,改了一下后:         order deny,allow         deny from all         allow from 90.14.212.42 这样就可以,好像deny, allow 的顺序要和后面deny,allow的顺序相同 甚至你可以这样写: order deny,allow deny from all allow from 12.345.67.890 allow from 890.67.345.12 如此可以添加多个ip

install god dame fastgci and fpm on our server.

first of all, need to create a child process of CGI which located in /etc/init.d/php-common-Perso.sh prefix="/opt/php-5.3.6-full"; exec_prefix=${prefix}; php_fpm_BIN="${exec_prefix}/sbin/php-fpm"; php_fpm_CONF="/home/siteadm/common/php/Perso.conf"; php_fpm_PID="/home/siteadm/common/php/Perso.pid"; php_fpm_INI="/home/siteadm/common/php/Perso.ini"; PHP_INI_SCAN_DIR="/home/siteadm/common/php/vhost"; php_opts="--fpm-config $php_fpm_CONF -c $php_fpm_INI" export PHP_INI_SCAN_DIR; . /home/siteadm_admin/template/php/php-fpm-init.sh the PHP_INI_SCAN_DIR include all specification of fpm for each virtual host of apache: [HOST=main.addepi.fr] open_basedir = "/data/admin/" doc_root = "/data/admin/web" mail.log = "/data/admin/app/logs/php.mail.error.log" short_open_tag = 1 error_log = "/data/admin/app/logs/php.error.log" default_charset = "utf-8" and some other package ...

change apache password file:

http://httpd.apache.org/docs/2.2/programs/htpasswd.html htpasswd  htpasswd  [ - c  ] [ - m  ] [ - D  ]  passwdfile   username htpasswd  - b  [ - c  ] [ - m  | - d  | - p  | - s  ] [ - D  ]  passwdfile   username   password htpasswd  - n  [ - m  | - d  | - s  | - p  ]  username htpasswd  - nb  [ - m  | - d  | - s  | - p  ]  username   password htpasswd /usr/local/etc/apache/.htpasswd-users jsmith Adds or modifies the password for user  jsmith . The user is prompted for the password. The password will be encrypted using the modified Apache MD5 algorithm. If the file does not exist,  htpasswd  will do nothing except return an error. htpasswd -c /home/doe/public_html/.htpasswd jane Creates a new file and stores a record in it for user  jane . The user is prompted for the password...

install apc

apt-get update apt-get install libpcre3-dev #an APC dependency apt-get install php5-cli apt-get install php5-dev wget http://pear.php.net/go-pear.phar #downloading pear, the php package manager php go-pear.phar #installing pear pecl install apc vim /etc/php5/apache2/php.ini #edit your php.ini and add extension=apc.so /etc/init.d/apache2 restart #restart apache to reload your php.ini file

enable gzip

转载: http://dnhome.wordpress.com/2011/10/06/apache-wampserver-enable-compression-gzip/ Apache – WampServer – enable compression gzip Posted: October 6, 2011 in  Apache ,  WAMP 1 Compression is a simple and effective way to speed up your site. Modern browsers supports gzip compressed content and are capable of uncompressing gzip data into plain text. If you use  WAMP  ( www.wampserver.com ) to develop websites on a local PC, then you probably don’t need to enable gzip (server-side file compression to reduce the amount of data transferred when a web page is requested). Enabling gzip on  WAMP  is actually quite easy, though most of the advice I found was wrong. Here’s what worked for me. 1. Enable Apache module to support gzip, you much enable two module:  deflate_module  and  headers_module  2. Config file type to support gzip on WAMP Server. Open the Apache’s httpd.conf and add the following code at the end of file. ...