Skip to content

Commit 7608dad

Browse files
committed
Merge branch 'doctor'
2 parents c42b0c9 + 2aed208 commit 7608dad

File tree

9 files changed

+1532
-193
lines changed

9 files changed

+1532
-193
lines changed

etc/bash_completion.d/ee

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ EEAUTO()
1818

1919
# List Of Suggested Words
2020
easyengine|ee)
21-
COMPREPLY=( $(compgen -W "version info update help system site" -- $CURRENT) )
21+
COMPREPLY=( $(compgen -W "version info update help system site debug" -- $CURRENT) )
2222
return 0
2323
;;
2424

2525
system)
26-
COMPREPLY=( $( compgen -W "install remove purge" -- $CURRENT ) )
26+
COMPREPLY=( $( compgen -W "install remove purge status start stop reload restart" -- $CURRENT ) )
2727
return 0
2828
;;
2929

@@ -32,6 +32,41 @@ EEAUTO()
3232
return 0
3333
;;
3434

35+
debug)
36+
COMPREPLY=( $(compgen -W "--nginx --rewrite --php --fpm --mysql --wp --stop" -- $CURRENT) )
37+
return 0
38+
;;
39+
40+
--nginx)
41+
COMPREPLY=( $(compgen -W "--rewrite --php --fpm --mysql --wp --stop" -- $CURRENT) )
42+
return 0
43+
;;
44+
45+
--rewrite)
46+
COMPREPLY=( $(compgen -W "--nginx --php --fpm --mysql --wp --stop" -- $CURRENT) )
47+
return 0
48+
;;
49+
50+
--php)
51+
COMPREPLY=( $(compgen -W "--nginx --rewrite --fpm --mysql --wp --stop" -- $CURRENT) )
52+
return 0
53+
;;
54+
55+
--fpm)
56+
COMPREPLY=( $(compgen -W "--nginx --rewrite --php --mysql --wp --stop" -- $CURRENT) )
57+
return 0
58+
;;
59+
60+
--mysql)
61+
COMPREPLY=( $(compgen -W "--nginx --rewrite --php --fpm --wp --stop" -- $CURRENT) )
62+
return 0
63+
;;
64+
65+
--wp)
66+
COMPREPLY=( $(compgen -W "--nginx --rewrite --php --fpm --mysql --stop" -- $CURRENT) )
67+
return 0
68+
;;
69+
3570
site)
3671
COMPREPLY=( $( compgen -W "list show info create enable disable delete edit" -- $CURRENT ) )
3772
return 0
@@ -42,7 +77,7 @@ EEAUTO()
4277
return 0
4378
;;
4479

45-
show|enable|delete)
80+
show|enable|delete|--stop)
4681
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-available/ -type f -printf "%P " 2>/dev/null)' -- $CURRENT ) )
4782
return 0
4883
;;

etc/easyengine/ee.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ gpg-keys-fix = false
99
htpasswduser =
1010
htpasswdpass =
1111

12+
# Comma Separated Whitelist/Debugging IP Address
13+
ip_address =
14+
1215
# WordPress Defaults
1316
# MySQL Default Host: localhost
1417
mysqlhost =

etc/nginx/common/locations.conf

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# DO NOT MODIFIED ALL CHNAGES LOST AFTER UPDATE EasyEngine
12
# Common Locations
23

34

@@ -21,35 +22,25 @@ location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gi
2122
}
2223

2324

24-
# EasyEngine Shared Settings
25-
location /ee/ {
26-
autoindex on;
27-
alias /var/www/shared/;
28-
include common/acl.conf;
29-
index index.php index.html index.htm;
30-
31-
location ~ ^/ee(.+\.php)$ {
32-
alias /var/www/shared$1;
33-
fastcgi_pass php;
34-
include /etc/nginx/fastcgi_params;
35-
}
36-
37-
location ~* ^/ee(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
38-
alias /var/www/shared$1;
39-
}
40-
}
25+
# Security Settings For Better Privacy
4126

42-
# PMA Settings
43-
location /pma {
44-
rewrite ^/* /ee/pma last;
27+
# Deny Hidden Files
28+
location ~ /\. {
29+
deny all;
30+
access_log off;
31+
log_not_found off;
4532
}
4633

47-
location /phpMyAdmin {
48-
rewrite ^/* /ee/pma last;
34+
# Deny Backup Extensions & Log Files
35+
location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp)$ {
36+
deny all;
37+
access_log off;
38+
log_not_found off;
4939
}
5040

51-
location /phpmyadmin {
52-
rewrite ^/* /ee/pma last;
41+
# Return 403 Forbidden For readme.(txt|html) or license.(txt|html)
42+
if ($request_uri ~* "^.+(readme|license)\.(txt|html)$") {
43+
return 403;
5344
}
5445

5546

@@ -67,23 +58,32 @@ location ~ ^/(status|ping) {
6758
}
6859

6960

70-
# Security Settings For Better Privacy
61+
# EasyEngine Admin Tools
7162

72-
# Deny Hidden Files
73-
location ~ /\. {
74-
deny all;
75-
access_log off;
76-
log_not_found off;
63+
# PMA Settings
64+
location /pma {
65+
return 301 https://$host:22222/db/pma;
7766
}
7867

79-
# Deny Backup Extensions & Log Files
80-
location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp)$ {
81-
deny all;
82-
access_log off;
83-
log_not_found off;
68+
location /phpMyAdmin {
69+
return 301 https://$host:22222/db/pma;
8470
}
8571

86-
# Return 403 Forbidden For readme.(txt|html) or license.(txt|html)
87-
if ($request_uri ~* "^.+(readme|license)\.(txt|html)$") {
88-
return 403;
72+
location /phpmyadmin {
73+
return 301 https://$host:22222/db/pma;
74+
}
75+
76+
# Adminer Settings
77+
location /adminer {
78+
return 301 https://$host:22222/db/adminer/;
79+
}
80+
81+
# Memcache Settings
82+
location /memcache {
83+
return 301 https://$host:22222/php/memcache/;
84+
}
85+
86+
# Opcache Settings
87+
location /opcache {
88+
return 301 https://$host:22222/php/opcache/;
8989
}

etc/nginx/common/wpcommon.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# DO NOT MODIFIED ALL CHNAGES LOST AFTER UPDATE EasyEngine
12
# WordPress Common Settings
23

34

etc/nginx/conf.d/upstream.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ upstream php {
33
# server unix:/run/php5-fpm.sock;
44
server 127.0.0.1:9000;
55
}
6+
7+
upstream debug {
8+
# Debug Pool
9+
server 127.0.0.1:9001;
10+
}

install.sh

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,27 @@ fi
123123
# Pre Checks End
124124

125125
# Clone EasyEngine (ee)
126-
echo -e "\033[34mCloning EasyEngine (ee), Please Wait...\e[0m" | tee -ai $INSTALLLOG
126+
if [ -z "$EE_BRANCH" ]
127+
then
128+
EE_BRANCH=stable
129+
else
130+
# Cross Check The Branch Name
131+
git ls-remote --heads https://github.com/rtCamp/easyengine | grep $EE_BRANCH &>> $INSTALLLOG
132+
133+
if [ $? -ne 0 ]
134+
then
135+
echo -e "\033[31mThe $EE_BRANCH Branch Does Not Exist, Please Provide The Correct Branch Name\e[0m" | tee -ai $INSTALLLOG
136+
exit 103;
137+
fi
138+
fi
139+
140+
echo -e "\033[34mCloning EasyEngine (ee) $EE_BRANCH Branch, Please Wait...\e[0m" | tee -ai $INSTALLLOG
127141

128142
# Remove Older EasyEngine (ee) If Found
129143
rm -rf /tmp/easyengine &>> /dev/null
130144

131-
# Clone EasyEngine (ee) Stable Repository
132-
git clone -b stable git://github.com/rtCamp/easyengine.git /tmp/easyengine &>> $INSTALLLOG || OwnError "Unable To Clone Easy Engine"
145+
# Clone EasyEngine (ee) Repository
146+
git clone -b $EE_BRANCH git://github.com/rtCamp/easyengine.git /tmp/easyengine &>> $INSTALLLOG || OwnError "Unable To Clone Easy Engine"
133147

134148

135149
# Create Directory /etc/easyengine
@@ -172,12 +186,6 @@ then
172186
ln -s /usr/local/sbin/easyengine /usr/local/sbin/ee
173187
fi
174188

175-
# Adjust FastCGI Cache Size 20% Of /var/run
176-
#VARRUNSIZE=$(df --block-size=M /var/run | awk '{print $4}' | tail -n1 |cut -d'M' -f1)
177-
#FCSIZE=$(expr $VARRUNSIZE \* 25 / 100)
178-
179-
# Change Size
180-
#sed -i "s/500m/$FCSIZE\m/" /usr/share/easyengine/nginx/conf.d/fastcgi.conf || OwnError "Unable To Change Fastcgi Cache Size"
181189

182190
# Git Config Settings
183191
EEGITNAME=$(git config user.name)

0 commit comments

Comments
 (0)