easyengine / easyengine Goto Github PK
View Code? Open in Web Editor NEWCommand-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt
Home Page: https://easyengine.io
License: MIT License
Command-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt
Home Page: https://easyengine.io
License: MIT License
After Creating Domain its showing following error message
Reloading Nginx Configuration, Please Wait...
nginx: [emerg] unknown log format "rt_cache" in /etc/nginx/sites-enabled/example-domain.com:6
nginx: configuration file /etc/nginx/nginx.conf test failed
Unable To Reload Nginx
After updating ee its showing error while setting up new wordpress single site.
Please check the following error message,
Error:
<h1>Error establishing a database connection</h1>
<p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>localhost</code>. This could mean your host's database server is down.</p>
<ul>
<li>Are you sure you have the correct username and password?</li>
<li>Are you sure that you have typed the correct hostname?</li>
<li>Are you sure that the database server is running?</li>
</ul>
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
[ Fri Aug 30 11:59:09 IST 2013 ] Unable To Create WordPress Tables For vserv-qa.com
set $dir "";
if ($request_uri ~ ^/([^/]*)/.*$ ) {
set $dir1 /$1;
}
location / {
try_files $uri $uri/ $dir1/index.php?$args;
}
New subcommand debug
need to be added
Install http://wordpress.org/plugins/developer/ and its sub-plugins
Add following from http://rtcamp.com/wordpress-nginx/tutorials/wordpress/debugging/
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
define('SAVEQUERIES', true);
I already have a example.com site under /var/www/example.com.
So, again I tried to create it
I got the error, domain already exists.
But, it overwrite the configuration of example.com under /etc/nginx/sites-available/example.com
clone site from one server to another using simple ee clone comamnds
Check Domain Name For Small Alphabets
Convert DomainWP.com to small letters.
While trying to install easyengine on a fresh Ubuntu 12.04 machine, I'm prompted to install curl.
It will be good if the script takes care of handling whether curl is needed, and installing it if required.
Is there an alternative way to load your script, which uses a method available by default on a fresh installation of Linux?
cp: overwrite ‘/etc/nginx/conf.d/blockips.conf’? y
‘/usr/share/easyengine/nginx/conf.d/blockips.conf’ -> ‘/etc/nginx/conf.d/blockips.conf’
cp: overwrite ‘/etc/nginx/conf.d/fastcgi.conf’? y
‘/usr/share/easyengine/nginx/conf.d/fastcgi.conf’ -> ‘/etc/nginx/conf.d/fastcgi.conf’
cp: overwrite ‘/etc/nginx/conf.d/upstream.conf’? y
‘/usr/share/easyengine/nginx/conf.d/upstream.conf’ -> ‘/etc/nginx/conf.d/upstream.conf’
cp: overwrite ‘/etc/nginx/common/locations.conf’? y
‘/usr/share/easyengine/nginx/common/locations.conf’ -> ‘/etc/nginx/common/locations.conf’
The script already overwritten these files, but when again I started the script, its asking me to overwrite these files.
I think, you must check whether, the files are update or not.
Restarting nginx: nginx: [emerg] unknown limit_req_zone "one" in /etc/nginx/common/wpcommon.conf:6
nginx: configuration file /etc/nginx/nginx.conf test failed
Menu driven program
It could start when ee -i
is provided or could be made default behavior for ee
or subcommands e.g. ee site
service nginx restart
Restarting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
fatal: Not a git repository (or any of the parent directories): .git
Unable To Git Commits On /etc/nginx
Can you provide prompt to add database prefix?
Like, by default I am getting wp_ from easyengine.
If I want to use another one rt_wp_ , then?
Lets use apt-get install php5-mysqlnd
Rather than apt-get install php5-mysql
after creating a new site......check of php-fpm is started or not......if not please start it
The site URL with www or without www.
If there is a single HTTP site, we must add SSL cache. It was present on rtCamp old server... We missed that during migration. Added it just now!
Add... /etc/nginx/nginx.conf
inside http{...}
block
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
Also add...
ssl_ciphers RC4:HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
http://nginx.org/en/docs/http/configuring_https_servers.html
[client]
user=root
pass="mypass"
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
nginx: configuration file /etc/nginx/nginx.conf test failed
[ Wed Jul 17 12:49:18 UTC 2013 ] Unable To Reload Nginx
/usr/local/sbin/ee: line 506: ed: command not found
on Ubuntu 12.04
Issue while installation easyengine (ee system install all)
It's creating issue while restarting nginx configuration.
Updating Nginx Configuration Files...
Restarting Nginx Configuration, Please Wait...
nginx: [emerg] "client_max_body_size" directive is duplicate in /etc/nginx/nginx.conf:42
nginx: configuration file /etc/nginx/nginx.conf test failed
[ Tue Sep 3 14:17:19 IST 2013 ] Unable To Restart Nginx
Test - PHP upgrade
Ubuntu with php 5.3
apt-get install php
Apache 80
PHP 5.3
setup check
PHP 5.4
Apache disable (ask)
Sometime service is failed to stop/start/restart in this case
https://github.com/rtCamp/rtAdmin/blob/master/zzz/restart.sh is not able to detect weather the service is restarted successfully or not.
I've some solutions for this problems
service mysql restart
CHECK=$(echo $?)
while [ $CHECK -gt 0 ]
do
#echo In While $CHECK
service mysql restart
CHECK=$(echo $?)
done
service php5-fpm restart
CHECK=$(echo $?)
while [ $CHECK -gt 0 ]
do
#echo In While $CHECK
service php5-fpm restart
CHECK=$(echo $?)
done
Its checking for wp-config.php file while deleting HTML or PHP site, check the log listed below,
root@UbuntuEE:~# ee site delete all wpbasic.com
grep: /var/www/wpbasic.com/wp-config.php: No such file or directory
grep: /var/www/wpbasic.com/wp-config.php: No such file or directory
grep: /var/www/wpbasic.com/wp-config.php: No such file or directory
WPDBNAME =
MYSQLUSER =
MYSQLPASS =
If I run a subcommand only, then help for that subcommand should be shown.
If Create domain like "http://example-domain.com/" it validate and remove http, https and www but not removing "/" which present in domain and showing following error message.
root@linux:~# ee site create wp basic http://example-domain.com/
WPNETWORKSITE = wp
WPCACHEOPTION = basic
SITENAMECHECK = http://example-domain.com/
NGINXCONF = wp/basic.conf
WPSUBDOMAINS =
NETWORKACTIVATE =
Creating example-domain.com/, Please Wait...
/usr/local/sbin/ee: line 510: /etc/nginx/sites-available/example-domain.com/: Is a directory
Unable To Create Nginx Configuration File For example-domain.com/
While i'm trying to purge php it show following messages
root@Abhishek:~# ee system purge php
Purge PHP5...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
apache2 apache2-bin apache2-data dbconfig-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libc-client2007e libgd3 libmcrypt4
libonig2 libqdbm14 libssl-dev libssl-doc mlock shtool zlib1g-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
apache2 apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
Suggested packages:
apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
The following packages will be REMOVED:
php-apc* php-gettext* php-pear* php5-apcu* php5-cgi* php5-cli* php5-common* php5-curl* php5-dev* php5-fpm* php5-gd* php5-imap* php5-json*
php5-mcrypt* php5-mysqlnd* php5-xmlrpc* phpmyadmin* pkg-php-tools*
The following NEW packages will be installed:
apache2 apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
0 upgraded, 7 newly installed, 18 to remove and 0 not upgraded.
Need to get 1,439 kB of archives.
Every time we install PMA it will overwrite files if already installed, see the log below
Installing PMA...
--2013-08-29 00:40:48-- http://dl.cihar.com/phpMyAdmin/master/phpMyAdmin-master-latest.tar.gz
Resolving dl.cihar.com (dl.cihar.com)... 77.78.110.71, 2001:1528:136:dead:beef::1003
Connecting to dl.cihar.com (dl.cihar.com)|77.78.110.71|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11333080 (11M) [application/x-gzip]
Saving to: `/var/www/shared/pma/pma.tar.gz'
100%[========================================================================================================================>] 11,333,080 --.-K/s in 0.1s
2013-08-29 00:40:48 (93.6 MB/s) - `/var/www/shared/pma/pma.tar.gz' saved [11333080/11333080]
ee log production
ee log dev
mysql slow log
php5-fpm slowlog
php error log debug
nginx error log debug
Sample wp-config.php have a slats section.
Update it using o/p of this page directly: https://api.wordpress.org/secret-key/1.1/salt
ee
or ee help
or ee -h
or ee --help
Should show usage and list of commands.
Also show message for help on a command, run ee help <command>
ee site list
ee site list --all
ee site show <sitename>
ee site info <sitename>
ee site create <sitename> <args>
If <--php> - add php support
If <-wp | --with-wordpress> => install wordpress (create database) in addition above.
If <-wp --multi --w3tc --wpsc --fc > => install with a cache config
--w3tc > w3 total cache
--wpsc > wp super cache
--fc > nginx's fastcgi cache + nginx-helper plugin
--multi-dir > wordpress multisite + subdirectory
--multi-dom > wordpress multisite + subdomain
args = --files --db --config --logs --all > delete accordingly
default all user can specify --files --db --config --logs
backup-structure
/path/to/backup/location/sitename/TIMESTAMP.zip
TIMESTAMP >> YYYY-MM-DD-HH-MM-SS
TIMESTAMP.zip
+files/
+logs/
+db/
+conf/
= --force - do not ask during restore
can be --instant --start --stop
--instant will start debugging and display tail. debug will stop as soon as CTRL + C is hit
--for-me > nginx debug_connection set to user's IP
--for-all > nginx erro_log set to debug
ee system config [set|get] [memory|timeout|etc]
ee config php --edit
php, php.ini, php5-fpm, fpm pool-www, nginx.conf, my.cnf main.cf master.cf etc
ee site edit <sitename>
open nginx conf for that site
Add write rule for website redirection.
e.g.
example.in should redirect to example.com
The re-write rule can be added in nginx conf file of example.in under /etc/nginx/sites-available/example.in
From where can we access phpmyadmin?
When we create a symbolic link in /etc/nginx/sites-enabled
Then shell script auto detect any new file is created in /etc/nginx/sites-enabled
Then call nginx -t
to check nginx configuration test
If nginx configuration test is passed
Then reload nginx using the following commands
service nginx reload
This following script is just a demo needed proper logging.
#!/bin/bash
dpkg --list | grep inotify-tools &> /dev/null
if [ $? -eq 0 ]
then
echo "Inotify Tools Already Installed"
else
echo "Installing Inotify Tools..."
apt-get -y install inotify-tools
fi
while true
do
inotifywait --exclude .swp -e create -e modify -e delete -e move /etc/nginx/sites-enabled
nginx -t
if [ $? -eq 0 ]
then
echo "Reloading Nginx Configuration"
service nginx reload
fi
done
curl -sL rt.cx/ee | sudo bash
EasyEngine Installation Started 08-Aug-2013 11:48:20
Installing Easy Engine, Please Wait...
For Easy Engine Auto Completion Run Following Command
source /etc/bash_completion.d/ee
Easy Engine Installed Successfully
Easy Engine Help: https://github.com/rtCamp/easyengine/wiki
It create nginx folder under /usr/share/easyengine/nginx this directory, It suppose to replace folder "nginx".
# disable hotlinking code
location ~* \.(svg|svgz|jpg|jpeg|gif|png|ico|bmp)$ {
valid_referers blocked example.com;
if ($invalid_referer) {
# return 405;
rewrite ^/(.*)$ http://rtcamp.com/wp-content/uploads/2010/03/wp-nginx-460x154.png;
}
}
ee
onlyee <command>
i.e. commandee <command> <subcommand>
i.e. subcommandee <command> [args]
i.e. command with argsee <command> <subcommand> [args]
i.e. subcommand with argsUse defaults args wherever possible or show HELP
ee system install
is same as ee system install all
Used this link http://rtcamp.com/easyengine/docs/site/create/ to create wordpresssingle site but none of them worked for me.
Its not throwing any error.
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
http://rerun.github.io/rerun/ (Github - https://github.com/rerun/rerun/ )
http://www.coboloncogs.org/INDEX.HTM
https://github.com/jayferd/balls
https://github.com/hornos/shf3
https://github.com/lmartinking/monkey-tail
https://github.com/Dieterbe/libui-sh
https://code.google.com/p/shesfw/
https://github.com/jpic/bashworks
http://www.bashinator.org/ (pdf - http://www.bashinator.org/docs/bashinator-20090610.pdf )
http://git.kernel.org/cgit/git/git.git/plain/contrib/completion/git-completion.bash?id=HEAD
https://github.com/jpic/bashworks
https://github.com/Dieterbe/libui-sh
http://sourceforge.net/projects/oobash/
http://neuroinformatics.harvard.edu/bash_framework.php
http://www.intuitive.com/wicked/wicked-cool-shell-script-library.shtml (library)
http://dberkholz.com/2011/04/07/bash-shell-scripting-libraries/ (list of framworks)
If not Ubuntu, say good-bye!
"easyengine is made for Ubuntu only as of now.
You are free to fork it for [OSNAME] - https://github.com/rtCamp/easyengine/issues/new"
Unix socket avoids the TCP overhead...
listen = /var/run/php5-fpm.sock
fastcgi_pass php5-fpm;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.