x-frame-option multiple domains wp

BEST WAY (in wp-config.php): if (!strstr($_SERVER[‚REQUEST_URI‘], ‚XXX-content‚)){header(‚X-Frame-Options: SAMEORIGIN‘);} apache.conf / bzw. seite-available im directory part: (klappt nur bei realen FILES/DIRs nicht bei umleitungen!!! <IfModule mod_headers.c># Allow some urls, block all others; whitelisting<LocationMatch ^((?!(firstUrlAllowed|secondUrlAllowed)).)*$>Header always append X-Frame-Options SAMEORIGIN # Block any Read more ›

mysql user export -> transfer

mysql – u root — password = PW – e „select concat(’show grants for ‚,’\“,user,’\’@\“,host,’\“) from mysql.user“ > user_list_with_header.txt sed ‚1d‘ user_list_with_header.txt >./ user .txt WHILE READ user; DO mysql – u root — password = PW – e „$user“ Read more ›

apache ordnerschutz per db-user/passwort

Der htaccess geschützte Bereich wird mit Usern aus der DB abgeglichen. a2enmod authn_dbd apt-get install libaprutil1-dbd-mysql service apache2 restart In DB: mysql -u root -p CREATE DATABASE htaccessuser; use htaccessuser GRANT ALL PRIVILEGES ON user.* TO ‚htaccessuser’@’localhost‘ IDENTIFIED BY ‚passwort‘; Read more ›

Easy multifactor authentication for SSH using YubiKey NEO tokens

The token comes with two PINs: the user PIN, default value „123456“; and the admin PIN, default value „12345678“. It is recommended to change these PINs. gpg –card-editadmingenerate(Sicherung anlegen, Key auf 4096 Byte)passwd(beide Passwörter ändern) in~/.gnupg/gpg-agent.conf pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac enable-ssh-support write-env-file Read more ›


Status abfragenecho ’stats‘ | nc 10.XXX.XXX.XXX 11211 echo ’stats settings‘ | nc 10.XXX.XXX.XXX 11211 Einstellungenemacs /etc/memcached.conf

strace apache2

#ubuntu ps h –ppid $(cat /var/run/apache2/apache2.pid) | awk ‚{print“-p “ $1}‘ | xargs sudo strace -o strace.txt oderstrace $(pgrep httpd | sed ’s/^/-p/‘) -o /home/test.txt -f -r -s4096  #debianstrace $(pgrep apache2 | sed ’s/^/-p/‘) -o /home/test.txt -f -r -s4096

wireshark dump

yum install -y tcpdump tcpdump -i eth0 -q ‚(tcp port 80) or (tcp port 443)‘ -s0 -w tcpdump.cap – > nur 80 & 443 sudo tcpdump -i wlan0 -q ‚(tcp port 80) or (tcp port 443)‘ -> in Dateischreiben und Pakete Read more ›

mysql tablesize

SELECT table_schema as `Database`, table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES ORDER BY (data_length + index_length) DESC;

mysql cache check

SHOW GLOBAL VARIABLES LIKE „long_query_time“; SHOW VARIABLES LIKE ‚%query_cache%‘; SHOW VARIABLES LIKE ‚%query%‘; SET GLOBAL general_log = 0; SHOW VARIABLES LIKE ‚%general_log%‘; SET GLOBAL slow_query_log = 1; SET GLOBAL query_cache_size = 0; SET @@GLOBAL.long_query_time = 1; SHOW STATUS LIKE ‚Qcache%‘; Read more ›