Skip to content

Instantly share code, notes, and snippets.

[ip, ip2, user, username, timestamp, request=*POST*xmlrpc.php*,...]
@sebastian-hsu
sebastian-hsu / gist:2dad13438909ec6564ef392b10c96a36
Last active March 14, 2017 09:46
/etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@sebastian-hsu
sebastian-hsu / gist:6eea02e0b46abbe71160019c197f0d16
Created March 16, 2017 00:39
wp-config.php DB settings from ENV
define('DB_NAME', $_SERVER["RDS_DB_NAME"]);
define('DB_USER', $_SERVER["RDS_USERNAME"]);
define('DB_PASSWORD', $_SERVER["RDS_PASSWORD"]);
define('DB_HOST', $_SERVER["RDS_HOSTNAME"]);
@sebastian-hsu
sebastian-hsu / gist:985d58362fbadff06a0943ec7e595495
Created March 16, 2017 00:41
wp-config.php Unique Keys and Salts settings from ENV
define('AUTH_KEY', $_SERVER["AUTH_KEY"]);
define('SECURE_AUTH_KEY', $_SERVER["SECURE_AUTH_KEY"]);
define('LOGGED_IN_KEY', $_SERVER["LOGGED_IN_KEY"]);
define('NONCE_KEY', $_SERVER["NONCE_KEY"]);
define('AUTH_SALT', $_SERVER["AUTH_SALT"]);
define('SECURE_AUTH_SALT', $_SERVER["SECURE_AUTH_SALT"]);
define('LOGGED_IN_SALT', $_SERVER["LOGGED_IN_SALT"]);
define('NONCE_SALT', $_SERVER["NONCE_SALT"]);
@sebastian-hsu
sebastian-hsu / gist:4fba9212c9e42aa84bf888394d25e469
Created March 16, 2017 00:52
wp-config.php WP_SITEURL and WP_HOME settings from ENV
define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST'].'/');
define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST'].'/');
vi /opt/bitnami/apache2/conf/httpd.conf
vi /opt/bitnami/php/etc/php.ini
/opt/bitnami/ctlscript.sh restart
@sebastian-hsu
sebastian-hsu / gist:31dfd3c2b1f018eaba2bb25b0e4efb21
Created March 27, 2017 23:59
wp-config.php DISALLOW_FILE_MODS setting
define('DISALLOW_FILE_MODS',true);
/* AWS */
define( 'DBI_AWS_ACCESS_KEY_ID', $_SERVER['AWS_ACCESS_KEY_ID'] );
define( 'DBI_AWS_SECRET_ACCESS_KEY', $_SERVER['AWS_SECRET_ACCESS_KEY'] );
@sebastian-hsu
sebastian-hsu / gist:d0fdc7f4f1b88df0b7dcd76c2f9ead0c
Last active August 7, 2017 06:42
wp-config.php HTTPS headers
if (($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] == 'https') || ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
$_SERVER['HTTPS'] = 'on';
}
#If you have blow definition, please change from http to https
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/');
@sebastian-hsu
sebastian-hsu / gist:da20f6106e6382d2970bcad34480221e
Last active March 5, 2024 14:51
Bitnami enable XDebug /opt/bitnami/php/etc/php.ini
[xdebug]
zend_extension="/opt/bitnami/php/lib/php/extensions/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000