As I found a blocker in one approach to make a Django app production ready I've gone with a different approach documented here.
In particular, this question is about this step where it says «Restart Apache for the changes to be taken into effect» and has the following associated command
sudo /opt/bitnami/ctlscript.sh restart apache
Thing is, ctlscript.sh isn't in that folder but in /opt/bitnami/stack. Then, when running in that forder
sudo ctlscript.sh restart apache
I get this error
sudo: ctlscript.sh: command not found
The file is there so I thought it would be something related with permissions (as pointed here).
The script is in the right folder, so the problem points to incorrect permissions.
sudo chmod 755 ctlscript.sh
but running the command to restart Apache got me into the same "command not found" error.
linux
path question. "command not found" does not point to "incorrect permissions". You're getting errors because the script is not in your PATH
. There's two ways you can go this
Run
pwd
and you will get the full path. If you get /home/bitnami/stack
, then, run
sudo /home/bitnami/stack/ctlscript.sh restart apache
Run
sudo ./ctlscript.sh restart apache
and that will work too
sudo: /opt/bitnami/stack/ctlscript.sh: command not found
. As you can see in the first image, the script is in that location I'm at ~/stack
. Is your home directory /opt/bitnami
? What folder does it say you are in when you run the pwd
command? How about just specifying the current directory via sudo ./ctlscript.sh restart apache
The following worked for me (I was getting a command not found error too):
sudo /opt/bitnami/ctlscript.sh restart apache
Taken from https://docs.bitnami.com/aws/faq/administration/control-services/