Drupal Image Guide
Introduction
By default, network access is turned off to a ECS instance. You can specify rules in a security group that allows access from an IP address range, port, or ECS security group.
You must specify port numbers (for TCP):
- 22 (ssh)
- 80 (http)
- 443 (https)
- 21, 20000~30000 (ftp)
Security groups document URL: Alibabacloud Security group
Image environment description
- Software version details:
drupal-8
ordrupal-9
- Source installation directory:
/data/wwwroot/drupal
- WordPress is based on LEMPSTACK: LEMPSTACK Image Guide
Drupal Guide
Database Info
- DB username:
root
- DB default root password: Display DB default root password
- DB name:
drupal
- DB address:
localhost
- More: DB Management
How to add a virtual host
Exec command
sudo /root/oneinstack/vhost.sh
e.g.: Execute command process
[root@OneinStack ~]# sudo /root/oneinstack/vhost.sh
#######################################################################
# OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ #
# For more information please visit https://oneinstack.com #
#######################################################################
What Are You Doing?
1. Use HTTP Only
2. Use your own SSL Certificate and Key
3. Use Let's Encrypt to Create SSL Certificate and Key
q. Exit
Please input the correct option: 3
Please input domain(example: www.example.com): demo.oneinstack.com
domain=demo.oneinstack.com
Please input the directory for the domain:demo.oneinstack.com :
(Default directory: /data/wwwroot/demo.oneinstack.com): /data/wwwroot/drupal
Virtual Host Directory=/data/wwwroot/drupal
Create Virtul Host directory......
set permissions of Virtual Host directory......
Do you want to add more domain name? [y/n]: y
Type domainname or IP(example: example.com other.example.com): demo2.oneinstack.com
domain list=demo2.oneinstack.com
Do you want to redirect from demo2.oneinstack.com to demo.oneinstack.com? [y/n]: y
Do you want to redirect all HTTP requests to HTTPS? [y/n]: y
Please select domain cert key length.
Enter one of 2048, 3072, 4096, 8192 will issue a RSA cert.
Enter one of ec-256, ec-384, ec-521 will issue a ECC cert.
Please enter your cert key length (default 2048): 2048
Please enter your email: lj2007331@mail.com
[Sun Oct 30 04:27:06 PM CST 2022] Create account key ok.
[Sun Oct 30 04:27:06 PM CST 2022] No EAB credentials found for ZeroSSL, let's get one
[Sun Oct 30 04:27:13 PM CST 2022] Registering account: https://acme.zerossl.com/v2/DV90
[Sun Oct 30 04:27:15 PM CST 2022] Could not get nonce, let's try again.
[Sun Oct 30 04:27:39 PM CST 2022] Registered
[Sun Oct 30 04:27:39 PM CST 2022] ACCOUNT_THUMBPRINT='LMG4Elq-AFm-IH17QAk3yjmp-8TNoxi__gWTIIT1tzY'
....
[Sun Oct 30 04:28:20 PM CST 2022] Cert success.
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Do you want to add hotlink protection? [y/n]: n
Allow Rewrite rule? [y/n]: y
Please input the rewrite of programme :
wordpress,opencart,magento2,drupal,joomla,codeigniter,laravel
thinkphp,pathinfo,discuz,typecho,ecshop,nextcloud,zblog,whmcs rewrite was exist.
(Default rewrite: other): drupal
You choose rewrite=drupal
Allow Nginx/Tengine/OpenResty access_log? [y/n]: y
You access log file=/data/wwwlogs/demo.oneinstack.com_nginx.log
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Reload Nginx......
#######################################################################
# OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ #
# For more information please visit https://oneinstack.com #
#######################################################################
Your domain: demo.oneinstack.com
Virtualhost conf: /usr/local/nginx/conf/vhost/demo.oneinstack.com.conf
Directory of: /data/wwwroot/drupal
Rewrite rule: /usr/local/nginx/conf/rewrite/drupal.conf
Let's Encrypt SSL Certificate:/usr/local/nginx/conf/ssl/demo.oneinstack.com.crt
SSL Private Key: /usr/local/nginx/conf/ssl/demo.oneinstack.com.key
The above Directory of is the website root directory (/data/wwwroot/drupal
), which will be automatically created after the script is executed. Please upload the code to this directory when deploying the website (directory, subdirectory and file permissions are: www
)
- Nginx the configuration file path:
/usr/local/nginx/conf/vhost/demo.oneinstack.com.conf
- Nginx the rewrite file path:
/usr/local/nginx/conf/rewrite/drupal.conf
Install Drupal
Open your domain name via browser, e.g.: https://demo.oneinstack.com