https://github.com/mirocow/site-create
Скрипт для создания сайтов
https://github.com/mirocow/site-create
configuration nginx server site-config
Last synced: 6 months ago
JSON representation
Скрипт для создания сайтов
- Host: GitHub
- URL: https://github.com/mirocow/site-create
- Owner: Mirocow
- Created: 2015-09-25T10:13:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-15T00:42:52.000Z (over 5 years ago)
- Last Synced: 2025-07-26T13:38:21.684Z (7 months ago)
- Topics: configuration, nginx, server, site-config
- Language: Shell
- Size: 33.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# site-create
RU: Скрипт для создания сайтов
ENG: This script create settings files for nginx, php-fpm, apache2.
```
OPTIONS:
-n | --host Host name without www (Example: --host=myhost.com)
-i | --ip IP address, default usage 80 (Example: --ip=127.0.0.1:8080)
-r | --redirect WWW redirect add (Example: --redirect=www-site or --redirect=site-www or disable redirect --redirect=off)
-a | --apache Usage apache back-end
-s | --awstats Usage awstats
-5 | --php5 Usage PHP 5.x
-7 | --php7 Usage PHP 7.x
-l | --lock Usage Nginx HTTP Auth basic
-h | --help Usage
EXAMPLES:
bash site-create.sh --host="yii2-eav.ztc" --ip="192.168.1.131:8082
```
## Для подключения PHP 7.0
``` sh
$ bash site-create.sh --host=yii2-eav.ztc --redirect=www-site -7
```
### Вывод
```
--------------------------------------------------------
User: mts.ztc
Login: mts.ztc
Password: ODE4N2UzMTNhMDJj
Path: /home/mts.ztc/
SSH Private file: /home/mts.ztc/.ssh/id_rsa
SSH Public file: /home/mts.ztc/.ssh/id_rsa.pub
Servers:
Site name: mts.ztc (192.168.1.131:80)
Use redirect from mts.ztc to mts.ztc
Site root: /home/mts.ztc/httpdocs/web
Site logs path: /home/mts.ztc/logs
Back-end server: PHP-FPM
NGINX: /etc/nginx/conf.d/mts.ztc.conf
PHP-FPM: /etc/php/7.0/fpm/pool.d/mts.ztc.conf
unixsock: /var/run/php-fpm-7-mts.ztc.sock
--------------------------------------------------------
```
### Для подключения PHP 5.x
``` sh
$ bash site-create.sh --host=yii2-eav.ztc --redirect=www-site -5
```
### Вывод
```
--------------------------------------------------------
User: mts.ztc
Login: mts.ztc
Password: MDIxZDcxMTk4YjY3
Path: /home/mts.ztc/
SSH Private file: /home/mts.ztc/.ssh/id_rsa
SSH Public file: /home/mts.ztc/.ssh/id_rsa.pub
Servers:
Site name: mts.ztc (192.168.1.131:80)
Use redirect from mts.ztc to mts.ztc
Site root: /home/mts.ztc/httpdocs/web
Site logs path: /home/mts.ztc/logs
Back-end server: PHP-FPM
NGINX: /etc/nginx/conf.d/mts.ztc.conf
PHP-FPM: /etc/php5/fpm/pool.d/mts.ztc.conf
unixsock: /var/run/php-fpm-5-mts.ztc.sock
--------------------------------------------------------
```