Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed Oct 27, 2018
1 parent 64a0dcf commit c6cbc6f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/php-fpm.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# php-pfm templates
There are two parts to the php-fpm templates: fpm config and nginx. On the nginx side, you have two options: `php-fpm` or `custom`
There are two config to the php-fpm templates: fpm and nginx. On the nginx side, you have two options: `php-fpm` or `custom`

![](https://raw.githubusercontent.com/niiknow/vestacp/master/docs/images/php-fpm.png?raw=true)

## nginx
`php-fpm` template is optimize for majority of framework including concrete5, laravel, and/or worpdress. Outside of that, you have use the `custom` template. See some examples below.
`php-fpm` template is optimize for majority of framework including concrete5, laravel, and/or wordpress. Outside of that, you have use the `custom` template. See some examples below.

- - -
`custom` template with [ActiveCollab](https://activecollab.com/)
1. Choose `custom` as your nginx template and php7xfpm template for APACHE2, don't worry, it's not really Apache2, it's really is fpm config just using the same UI as APACHE2.
2. Add a file: /home/{user}/web/{website.example.com}/private/custom.conf
1. Choose `custom` as your nginx template and php7xfpm template for APACHE2. Don't worry, it's not really Apache2. It's is fpm config just re-using the same UI as APACHE2.
2. Add a file: `/home/{user}/web/{website.example.com}/private/custom.conf`

```
index proxy.php;
Expand Down Expand Up @@ -66,15 +66,16 @@ There are two parts to the php-fpm templates: fpm config and nginx. On the ngin
```

Remember to replace {user} and {website.example.com} with approprivate value.
Remember to replace `{user}` and `{website.example.com}` with appropriate/valid value.

- - -
**Note**: `custom` template can be use with anything, not just for PHP.

`custom` template for [Gogs](https://gogs.io/) (self-hosted git written in Golang) or any kind of service that you want to nginx proxy_pass to nodejs, dotnet, etc...
`custom` template for [Gogs](https://gogs.io/) (self-hosted git written in Golang) or any kind of service that you want to nginx proxy_pass such as service running with nodejs, dotnet, etc...

1. Choose `custom` as your nginx template and `default` for APACHE2.
2. Add a file: /home/{user}/web/{website.example.com}/private/custom.conf
2. Add a file: `/home/{user}/web/{website.example.com}/private/custom.conf`

```
location / {
# force https-redirects if not http
Expand All @@ -96,7 +97,8 @@ location @fallback {
include /etc/nginx/location_optmz_php.conf;
```

This assume that you're running Gogs web on port 10080 so it proxy to that port. Your gogs app.ini may look like so:
This assume that you're running Gogs Web on port 10080 so we proxy that port. Your gogs `app.ini` may look like so:

```
$ cat app.ini
APP_NAME = Your Git Service
Expand Down
3 changes: 3 additions & 0 deletions rootfs/etc/my_init.d/startup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

# save HOSTNAME
export XHOSTNAME="$HOSTNAME"
export TERM=xterm
MYPASS=

Expand Down Expand Up @@ -56,6 +58,7 @@ fi
# auto ssl on start
if [ -f /bin/vesta-auto-ssl.sh ]; then
echo "[i] running /bin/vesta-auto-ssl.sh"
export HOSTNAME="$XHOSTNAME"
bash /bin/vesta-auto-ssl.sh
fi

Expand Down

0 comments on commit c6cbc6f

Please sign in to comment.