Much as the title says, I’m hosting a PHP application in an EC2 instance (elastic beanstalk) on Amazon Web Services, actually running WordPress connecting to an RDS instance. I’ve been needing to restart apache for a number of reasons, mainly because I’m using the mod_pagespeed apache module.
Almost without fail when I do that though, it deletes the contents of /var/www/html/
using this command:
sudo service httpd restart
I’m at a bit of a loss since I’m new to AWS, but this clearly isn’t desired functionality. Is there another way I ought to go about restarting apache? Can anyone explain why that’s happening?
Any advice welcomed, I feel I’ve got to grips well with most of the admin but this is just a head scratcher for me!
I’m not sure what’s happening with the deleting of the content, but you can try to use the graceful command to restart instead.
This will gracefully reload its configuration!
or the reload command