简体   繁体   中英

PHP Server on Amazon Linux EC2

I recently created a PHP server on an Amazon EC2 Linux AMI instance and I am struggling to figure out how do to upload the PHP code to in order to be displayed on the browser from a .php file type setting.

The only option that was availiable to me to write PHP code and have it displayed was through creating a script directly from the Linux Terminal using the following commands

>SamplePage.php   #this creates the php file
nano SamplePage.php   #this opens the editor to start writing the code in the terminal.

However is there a visual interface that I could use to upload php code files/documents/pictures. So that I can click and drag the .php file on to the server without typing it on the terminal?

Does the phpMyAdmin do that? Or is is only for used managing MySQL (database) tasks and not for uploading PHP files/graphs/pictures needed to develop a fully integrated site?

By the way, here are the instructions I used to create the LAMP server with PHP as well as MySQL. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html

  • phpMyAdmin is a web-interface for managing databases.

  • You could check if there is already some ftp -server installed. Like vsfpt (just an example, there are a lot more free & open source ftp-servers available). if you encounter any problems with that a good place to ask questions related to hosting and servers is ServerFault

  • You could also transfer the files via ssh -connection with the help of scp (See: How to copy files from one machine to another using ssh or How to upload local system files to Amazon EC2 using ssh ). Another option would be to use a visual ssh-client.

  • There is also server-management software available that offer a visual file-manager as a website, like plesk , but since you already setup most of the stack this would be hard to do on top of that.

  • There are many IDEs and Editors that have support for SSH and SCP. Either built in or through plugins. For example: Eclipse, Netbeans, Atom and VSCode. All of which are free and can be configured to support PHP development.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM