Monthly Archives: June 2009

nginx php file upload limit

0
Filed under WEB-DEV-LOG
Tagged as

on FreeBSD
/usr/local/etc/php.ini
(default of 2M)
upload_max_filesize = 10M;
post_max_size = 20M

/usr/local/etc/nginx/
client_max_body_size 20m;
(default 1m)

nginx rediret

0
Filed under WEB-DEV-LOG
Tagged as

permanent redirect for all images in this directory to a different subdomain:

www.domain.com/images/

to:

images.domain.com/images/

rewrite ^/images(.*)$ images.domain.com/images$1 permanent;

nginx rewrite

0
Filed under WEB-DEV-LOG
Tagged as

permanent redirect for all images in this directory to a different subdomain:

www.domain.com/images/

to:

images.domain.com/images/

rewrite ^/images(.*)$ images.domain.com/images$1 permanent;

nginx

0
Filed under WEB-DEV-LOG
Tagged as

php and wordpress is now working. The latest problem was a broken wordpress install .

nginx rewrite crap

0
Filed under WEB-DEV-LOG
Tagged as

xxxx.bubble.net.cn/sql/ gets redirected to this

xxxx.bubble.net.cn./index.php?token=6bc3b48070f8ddeb394dc2f884fa4640

nginx php rewite rule

0
Filed under WEB-DEV-LOG
Tagged as

location /path/to/phymyadmin/ {
if ( $uri !~ .*\.php$” ) {
rewrite ^/(.*)$ /index.php last;
}
}

0
Filed under WEB-DEV-LOG
Tagged as

www.cyberciti.biz/tips/howto-keep-freebsd-system-upto-date.html

Upgrade FreeBSD ports collection
#portsnap fetch extract

Display outdated ports list

You can list outdated ports list with pkg_version command:
# pkg_version -vIL=
# pkg_version -vIL’<‘

Update FreeBSD packages / software

Now run portmanager to upgrade installed ports:
# portmanager -u

If you need to upgrade all installed ports with logging, enter:
# portmanager -u -l

How do I apply binary security updates for FreeBSD?
# freebsd-update fetch
# freebsd-update install

FreeBSD mysql on all ports. quick fix

0
Filed under WEB-DEV-LOG
Tagged as

By default ports does not create a my.cnf file.

By default MySQL accepts connection over the LAN. I prefer to restrict it to localhost only. Starting with more recent versions of the FreeBSD MySQL port, you can do this:

$ grep mysql /etc/rc.conf
mysql_enable=”YES”
mysql_args=”–bind-address=127.0.0.1″

Then restart mysql:

# /usr/local/etc/rc.d/mysql-server.sh restart
Stopping mysql.
Waiting for PIDS: 90230.
Starting mysql.

Before:

# netstat -an | grep 3306

serverbeach ssh

0
Filed under WEB-DEV-LOG
Tagged as

extra ssh on port 225 controlled by
/etc/rc.d/sbadm

nginx php

0
Filed under WEB-DEV-LOG
Tagged as

problem seems to be with spawn-fcgi. only starts manualy with this command

# /usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www -g www -f /usr/local/bin/php-cgi

# sockstat -4 | grep 9000

www.cyberciti.biz/faq/freebsd-configure-nginx-php-fastcgi-server/