How to deploy PHP on the cloud: 1. Enter the console and find the cloud server ECS; 2. Enter the management terminal password to enter the server; 3. Download Xftp and Xshell; 4. Create a new database and add the local Import the SQL file exported from the database to the Alibaba Cloud server; 5. Drag the php file into the root directory of the website on the right.
The operating environment of this article: centOS6.8 system, PHP5.6 version, Dell G3 computer.
How to deploy php on the cloud? Alibaba Cloud PHP website deployment
First you need to buy an Alibaba Cloud server, and you can choose the operation when buying it System (you can also change the operating system in the console after purchasing)
I am using CentOS. After purchasing the server, I need to add a multi-language environment. This needs to be done in the cloud. Search the market for "multi-language environment" and buy it. There are free ones and paid ones. It depends on which one you need. I use the free one.
Then enter the console and find the cloud server ECS
Enter the cloud server ECS and click on the instance, where you will see Purchased server
Click more, then reset the password. After resetting the password, you need to restart the server. Click Manage. There is a restart option in the upper right corner. After configuring, return and click Remote connection, then he will give you a management terminal password, remember this password.
Then enter the management terminal password to enter the server.
#When entering, you need to enter your login account (the default is root) and password (the password you just reset) and then the connection is successful.
Next you need to download Xftp and Xshell. Xftp is used for file transfer, that is, to transfer your local php web page to the Alibaba Cloud server. Cloud Server.
Open Xshell, create a new session and give it a name. My name is test, the protocol is SSH, and the host is the public IP address of the Alibaba Cloud server, which can be seen in the instance in the console.
Then enter the username (root) and password to use Xshell to operate the Alibaba Cloud server. After that, if your multi-language environment (mentioned above) is configured, then open the browser and enter the public network address, and the following page will appear (if rejected, please close the firewall of the Alibaba Cloud server and enter service iptables stop):
Click on "CentOS Nginx PHP JAVA Multilingual Mirror User Manual V1.6.pdf". It is recommended to take a look at the manual. There are many operations in it, so I won’t go into them one by one. . Notice that there is phpMyAdmin, which is the database of Alibaba Cloud server. Click to enter and you can operate it with your local browser. The username and password of phpMyAdmin are in the user manual, check it out yourself. After logging in, import your local database. You need to create a new database (same as the local database), and then import the SQL file exported from the local database to the Alibaba Cloud server. The database import will be successful.
There is a source code installation directory in the manual
#Deploy the website you need to deploy to the root directory of the website, and you can access it website. Specifically, open Xshell, make sure you also download Xftp, and click New File Transfer.
It will automatically run Xftp. The left is your local directory and the right is your Alibaba Cloud directory. Find your php file and drag the php file into the website root directory on the right to access the website. Note that The website root directory is not root.
Website operation results:
The above is the detailed content of How to deploy php on the cloud. For more information, please follow other related articles on the PHP Chinese website!

The article compares ACID and BASE database models, detailing their characteristics and appropriate use cases. ACID prioritizes data integrity and consistency, suitable for financial and e-commerce applications, while BASE focuses on availability and

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

Article discusses best practices for PHP input validation to enhance security, focusing on techniques like using built-in functions, whitelist approach, and server-side validation.

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

The article discusses the benefits of using password_hash and password_verify in PHP for securing passwords. The main argument is that these functions enhance password protection through automatic salt generation, strong hashing algorithms, and secur

The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

The article discusses strategies to prevent XSS attacks in PHP, focusing on input sanitization, output encoding, and using security-enhancing libraries and frameworks.

The article discusses the use of interfaces and abstract classes in PHP, focusing on when to use each. Interfaces define a contract without implementation, suitable for unrelated classes and multiple inheritance. Abstract classes provide common funct


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)
