Skip to content

Commit 7cd9438

Browse files
committed
Update docs; fine-tune username/s
1 parent 3e803d2 commit 7cd9438

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Script/s to install LEMP in a linux box. This LEMP stack is fine-tuned towards WordPress installations. It may work for other PHP based applications, too. For more details, please see the blog post at [https://www.tinywp.in/wp-in-a-box/](https://www.tinywp.in/wp-in-a-box/).
44

5+
There are a number of similar scripts available on the internet. The unique feature of this repo is in [security considerations](https://github.com/pothi/wp-in-a-box#security-considerations).
6+
57
## Supported Platforms
68

79
+ Ubuntu Bionic Beaver (18.04.x)
@@ -12,17 +14,18 @@ Script/s to install LEMP in a linux box. This LEMP stack is fine-tuned towards W
1214

1315
In sync with WordPress philosophy of “[decision, not options](https://wordpress.org/about/philosophy/)”.
1416

15-
## Performance Checklist
17+
## Performance Considerations
1618

17-
- Redis for object cache (with memcached as an option)
18-
- WP Super Cache as full page cache (with Batcache as an alternative)
19+
- No added bloatware
20+
- Redis for object cache (available as an optional package)
21+
- Full page cache support (WP Super Cache, WP Rocket and WP Fastest Cache)
1922
- PHP 7.x
2023
- Nginx (no Apache, sorry)
2124
- Varnish (planned, but no ETA)
25+
- Swap
2226

2327
## Security Considerations
2428

25-
- Only ports 80, 443, and port for SSH are open.
2629
- No phoning home.
2730
- No external dependencies (such as third-party repositories, unless there is a strong reason to use it).
2831
- Automatic security updates (with an option to update everything).
@@ -32,6 +35,8 @@ In sync with WordPress philosophy of “[decision, not options](https://wordpres
3235
- ACL integration.
3336
- Weekly logwatch (if email is supplied).
3437
- Isolated user for PhpMyAdmin.
38+
- PHP user and Nginx user run under different username.
39+
- Only ports 80, 443, and port for SSH are open.
3540

3641
## Implementation Details
3742

@@ -93,19 +98,19 @@ cat ~/.envrc
9398

9499
## What you get at the end of the installation
95100

96-
- a SSH user (prefixed with `sys_`) with root privileges (use it only to manage the server such as to create a new MySQL database or to create a new vhost entry for Nginx)
97-
- a chrooted SFTP user, prefixed with `web_`, with its home directory at `/home/web` along with some common directories(such as ~/log, ~/sites, etc) created already. (you may give it to your developer to access the file system such as to upload a new theme, etc)
101+
- a SSH user (prefixed with `ssh_`) with root privileges (use it only to manage the server such as to create a new MySQL database or to create a new vhost entry for Nginx)
102+
- a chrooted SFTP user, prefixed with `sftp_web_`, with its home directory at `/home/web` along with some common directories(such as ~/log, ~/sites, etc) created already. (you may give it to your developer to access the file system such as to upload a new theme, etc)
98103

99104
## Where to install WordPress & How to install it
100105

101106
- PHP runs as SFTP user. So, please install WordPress **as** SFTP user at `/home/web/sites/example.com/public`.
102107
- Configure Nginx using pre-defined templates that can be found at the companion repo [WordPress-Nginx](https://github.com/pothi/wordpress-nginx). That repo is already installed. You just have to copy / paste one of [the templates](https://github.com/pothi/wordpress-nginx/tree/master/sites-available) to fit your domain name.
103-
- If you wish to deploy SSL, a [Let's Encrypt](https://letsencrypt.org/) client is already installed. Just use the command `certbot certonly --webroot -w /home/web/sites/example.com/public -d example.com -d www.example.com`. The renewal script is already in place as a cron entry. So, you don't have to create a new entry. To know more about this client library and to know more about the available options, please visit https://certbot.eff.org/ .
108+
- If you wish to deploy SSL, a [Let's Encrypt](https://letsencrypt.org/) client is already installed. Please use the command `certbot certonly --webroot -w /home/web/sites/example.com/public -d example.com -d www.example.com`. The renewal script is already in place as a cron entry. So, you don't have to create a new entry. To know more about this client library and to know more about the available options, please visit [https://certbot.eff.org/](https://certbot.eff.org/) .
104109

105110
## Known Limitations
106111

107112
- SFTP user can not create or upload new files and folders at `$HOME`, but can create or upload inside other existing directories. This is [a known limitation](https://wiki.archlinux.org/index.php/SFTP_chroot#Write_permissions) when we use SFTP capability of built-in OpenSSH server.
108113

109114
## Wiki
110115

111-
For more documentation, supported / tested hosts, todo, etc, please see the [WP-In-A-Box wiki](https://github.com/pothi/wp-in-a-box/wiki).
116+
For more documentation, information, supported/tested hosts, todo, etc, please see the [WP-In-A-Box wiki](https://github.com/pothi/wp-in-a-box/wiki).

bootstrap.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# programming env: these switches turn some bugs into errors
44
# set -o errexit -o pipefail -o noclobber -o nounset
55

6-
# Version: 2
6+
# Version: 2.1
77

88
# to be run as root, probably as a user-script just after a server is installed
99

@@ -13,8 +13,6 @@
1313
# exit 1
1414
# fi
1515

16-
# TODO - change the default repo, if needed - mostly not needed on most hosts
17-
1816
# create some useful directories - create them on demand
1917
mkdir -p /root/{backups,git,log,scripts} &> /dev/null
2018

scripts/server-admin-creation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ echo "Creating a 'server admin' user..."
99

1010
if [ "$system_admin_username" == "" ]; then
1111
# create SSH username automatically
12-
system_admin_username="sys_$(pwgen -A 8 1)"
12+
system_admin_username="ssh_$(pwgen -A 8 1)"
1313
echo "export system_admin_username=$system_admin_username" >> /root/.envrc
1414
fi
1515

scripts/web-developer-creation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ echo 'Creating a "web developer" user...'
99

1010
if [ "$web_developer_username" == "" ]; then
1111
# create SFTP username automatically
12-
web_developer_username="web_$(pwgen -A 8 1)"
12+
web_developer_username="sftp_web_$(pwgen -A 8 1)"
1313
echo "export web_developer_username=$web_developer_username" >> /root/.envrc
1414
fi
1515

0 commit comments

Comments
 (0)