Operate the Nginx and PHP-FPM (or HHVM) in the ec2-user

The directory /var/www/vhosts which WordPress is installed is owned by the user of nginx who runs the web server, so you can’t upload files there with sftp client and so on.
So as Nginx and PHP-FPM (or HHVM) is operating in the ec2-user, it will change the Web server user.

Execution of Run HTTPD as ec2-user

Introduction you login to the server (instance) in SSH.

$ ssh -i {path_to_key}xxxx.pem ec2-user@{your_instance_ip_address}

Next, run the following command.

$ curl -L https://raw.githubusercontent.com/amimoto-ami/run-httpd-as-ec2-user/master/run-httpd-as-ec2-user.sh | sudo bash

Run this command only once after you create the instance.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk