Build the basic process of the virtual site after the Nginx environment is built

Source: Internet
Author: User
Tags ftp create database

Because I hung an empty disk on the home ... Recommended do not hang in home directory ...

cd/home/wwwroot/(go to Site Directory)

mkdir (Create a folder, generally named after the domain name folder)

CD (go to the folder you just created)

1. Download form:


Can directly, download directly to the directory below, and then unzip ...

2, upload the form:

You must first build an FTP

Puredb This form:

PURE-PW useradd xxx.xxxftp-u ftpgroup-d/home/wwwroot/ # xxx.xxxftp is user name Ftpgroup is an FTP user (non-virtual user)-D followed by xxx.xx Xftp User Directory-M direct generation Puredb not MKDB

The same decompression after the good pass.

Create a MySQL Account

Mysql-u root-p # Enter password

Create Database; # Create the database ( is the database name).

Create user ' ' @ ' localhost ' identified by ' password '; # CREATE DATABASE username username password The password corresponding to the username;

Grant all privileges in* to ' ' @ ' localhost; # Specify the database username for this database for and specify all permissions for the;

OK exit;

To test whether a new account is available

Mysql-u # Enter just the password;

show databases; # Check to see if there is a this database;

After extracting the root directory of the newly created site file:

To import a database:

Log in with the newly created database account and import;



To create a virtual site configuration file

CD/USR/LOCAL/NGINX/CONF # This path has environmental decisions

Do not know the path can whereis Nginx

CP default.conf


Modify the server_name after the site named; Or is determined by the request;

The root directory of the virtual site after modifying root is/home/wwwroot/ full path


modifying data/ files

Corresponding database, account, password.

The final step is to parse


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.