Posted by admin on June 8, 2009 – 7:52 pm
Filed under WEB-DEV-LOG
Tagged as
server beach puts in a backdoor ssh server running on port 225 which only uses keys. Disable this
and setup up loggin on the ‘beach’ account
fix port that mysql is running on localhost only
fix sendmail. fuck that shit.
cari.net enable there user but put on extreme logging.
Posted by admin on June 8, 2009 – 12:59 pm
Filed under BSD
Tagged as
/usr/ports/archivers/unzip make install clean
cd /usr/ports/lang/php5/
cd /usr/ports/lang/php5-extensions/
directions from here
vm.kmem_size=1844M
kern.maxbcache=64M
kern.ipc.maxpipekva=4M
/etc/sysctl.conf:
kern.ipc.nmbjumbop=192000
kern.ipc.nmbclusters=229376
kern.ipc.maxsockets=204800
net.inet.tcp.maxtcptw=163840
kern.maxfiles=204800
kern.ipc.somaxconn=4096
VIM line numbers
:set number
# cd /tmp
# fetch bash.cyberciti.biz/dl/251.sh.zip
# unzip 251.sh.zip
# mv 251.sh /usr/local/etc/rc.d/php.cgi.sh
# chmod +x /usr/local/etc/rc.d/php.cgi.sh
# rm 251.sh.zip
# /usr/local/etc/rc.d/php.cgi.sh start
# sockstat -4 | less
# vi /usr/local/etc/nginx/nginx.conf
server {
listen 80;
server_name theos.in www.theos.in;
access_log /var/log/nginx/theos.in/access.log main;
location / {
root /home/www/theos.in/http;
index index.php index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/www/theos.in/http$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
Restart Nginx web server
# nginx -c /usr/local/etc/nginx/nginx.conf -t
# /usr/local/etc/rc.d/nginx restart
Test php with following sample script:
<?php
phpinfo();
?>
WORKING [KEY LINE]
fastcgi_paramĀ SCRIPT_FILENAMEĀ /home/www/soap.bubble.net.cn/htroot$fastcgi_script_name;
nginx -c /usr/local/etc/nginx/nginx.conf -t