Tags » SysAdmin

Cyber Swiss Army Knife: CyberChef

CyberChef is a simple, intuitive web app for carrying out all manner of “cyber” operations within a web browser. These operations include creating hexdumps, simple encoding like XOR or Base64, more complex encryption like AES, DES and Blowfish, data compression and decompression, calculating hashes and checksums, IPv6 and X.509 parsing, and much more. 688 more words

System Admin

CakePHP Vhost for NGINX

First, configure PHP-FPM.

Then…

nano /etc/nginx/sites-available/your.site.com.conf
server {
 server_name your.site.com;
 listen 80;

index index.php index.html index.htm;
 root /var/www/vhosts/your.site.com/webroot;


 # CakePHP
 # main cakephp rewrite rule
 location / {
 try_files $uri $uri/ /index.php?$uri&$args;
 }

location ~ .php$ {
 root /var/www/vhosts/your.site.com/webroot;
 try_files $uri =404;
 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
 fastcgi_index index.php;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 include fastcgi_params;
 fastcgi_buffer_size 128k;
 fastcgi_buffers 256 4k;
 fastcgi_busy_buffers_size 256k;
 fastcgi_temp_file_write_size 256k;
 }


location ~ /\.ht {
 deny all;
 }

error_page 500 502 503 504 /50x.html;




 location = /50x.html {
 root /usr/share/nginx/html;
 }

error_log /var/log/nginx/your.site.com.error.log;
}


# After:
# chmod -R 777 /var/www/vhosts/your.site.com/logs
# chmod -R 777 /var/www/vhosts/your.site.com/tmp/cache
Sysadmin

PHP Site through NGINX

yum install php-fpm php-mysql
nano /etc/php-fpm.d/www.conf
(...)
listen = /var/run/php-fpm/php-fpm.sock
listen.owner = nobody
listen.group = nobody
user = nginx
group = nginx
php_value = 128M
php_value = 128M
php_value = 200
php_value = 'UTC'
(...)

chown -R nginx:nginx /usr/share/nginx/html

nano /etc/php.ini
(...)
; Dangerous when = 1
cgi.fix_pathinfo=0
(...)


mkdir -p /var/lib/php_session_save
chown nginx:nginx /var/lib/php_session_save

VHOST=www.yoursite.com
nano /etc/nginx/sites-available/$VHOST.conf
(...)
ln -s /etc/nginx/sites-available/$VHOST.conf /etc/nginx/sites-enabled/$VHOST.conf

systemctl enable php-fpm
systemctl reload nginx
systemctl restart php-fpm

… 21 more words
Sysadmin

dont install any products that use @flexerasoftware on you ed/x/ubuntu servers it appears to write data to your boot sector

dont install any products that use @flexerasoftware on you ed/x/ubuntu servers it appears to write data to your boot sector

Fsse

SuiteCRM installation on CentOS 7 with NGINX

VHOST=crm.yourdomain.com

mkdir -p /var/www/vhosts/$VHOST

wget from https://suitecrm.com/download

chmod 766 /var/www/vhosts/$VHOST/config_override.php 
chmod 766 -R /var/www/vhosts/$VHOST/custom
chmod 755 -R /var/www/vhosts/$VHOST/cache
chmod -R 755 /var/www/vhosts/$VHOST/cache
chown nginx:nginx -R /var/www/vhosts/$VHOST

yum install php-mbstring php-imap php-gd
systemctl reload php-fpm

nano /etc/crontab 
(...)
# SuiteCRM
* * * * * cd /var/www/vhosts/$VHOST; php -f cron.php > /dev/null 2>&1
(...)
systemctl reload crond

nano /etc/nginx/sites-available/$VHOST.conf
server {
 server_name crm.yourdomain.com;

 listen 443 ssl;
 ssl_certificate /etc/letsencrypt/live/crm.yourdomain.com/cert.pem;
 ssl_certificate_key /etc/letsencrypt/live/crm.yourdomain.com/privkey.pem;
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 ssl_ciphers HIGH:!aNULL:!MD5;

 client_max_body_size 50M;

 index index.php index.html index.htm;
 root /var/www/vhosts/crm.yourdomain.com;

 location / {
 root /var/www/vhosts/crm.yourdomain.com;
 index index.php index.html index.htm;
 }
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root /usr/share/nginx/html;
 }

 ## Images and static content is treated different
 location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|xml|svg|wgoff2)$ {
 access_log off;
 expires max;
 root /var/www/vhosts/crm.yourdomain.com;
 }

 location ~ \.php$ {
 try_files $uri =404;
 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
 fastcgi_index index.php;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 include fastcgi_params;
 }

 location ~ /\.ht {
 deny all;
 }

 error_log /var/log/nginx/crm.yourdomain.com.error.log;
}

Sysadmin

Xendesktop quirks & pitfalls

  • System going crazy?
    • Does the server have enough RAM allocated?
    • 16GB are needed for 100VMs …
Sysadmin

How to redirect a URL fragment - hashtag in the URL

If you have address similar to http://host/#/blah, only ‘host’ is sent to the webserver – #/blah is only handled in the browser. This is called a fragment identifier. 38 more words

Sysadmin