Wrong link from my part, have been looking at:
https://docs.bitnami.com/aws-templates/apps/wordpress/administration/control-services/
for the start stop commands
sudo /opt/bitnami/ctlscript.sh restart
did not work.
got
sudo: /opt/bitnami/ctlscript.sh: command not found
Tried the below command and got the following:
bitnami@ip-10-0-4-140:~$ sudo service bitnami status
● bitnami.service - LSB: Bitnami Init Script
Loaded: loaded (/etc/init.d/bitnami; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2019-12-01 23:50:13 UTC; 17h ago
Docs: man:systemd-sysv-generator(8)
Process: 1753 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILURE)
Tasks: 11 (limit: 4915)
CGroup: /system.slice/bitnami.service
├─529 php-fpm: master process (/opt/bitnami/php/conf/php-fpm.conf)
├─530 php-fpm: pool www
├─531 php-fpm: pool www
├─532 php-fpm: pool www
├─533 php-fpm: pool www
├─534 php-fpm: pool www
├─535 php-fpm: pool www
├─536 php-fpm: pool www
├─537 php-fpm: pool www
├─538 php-fpm: pool www
└─539 php-fpm: pool www
Dec 01 23:49:39 ip-10-0-4-140 bitnami[1753]: 2019-12-01T23:49:39.445Z - info: Performing service start operation for php
Dec 01 23:49:40 ip-10-0-4-140 bitnami[1753]: com.bitnami.php is already running
Dec 01 23:49:40 ip-10-0-4-140 bitnami[1753]: 2019-12-01T23:49:40.547Z - info: Performing service start operation for apache
Dec 01 23:50:13 ip-10-0-4-140 bitnami[1753]: nami ERROR Unable to start com.bitnami.apache: AH00526: Syntax error on line 39 of /opt/bitnami/apache/conf/vhosts/htacc
Dec 01 23:50:13 ip-10-0-4-140 bitnami[1753]: RewriteBase: only valid in per-directory config files
Dec 01 23:50:13 ip-10-0-4-140 bitnami[1753]: 2019-12-01T23:50:13.864Z - error: Unable to perform start operation nami command exited with exit code 1
Dec 01 23:50:13 ip-10-0-4-140 systemd[1]: bitnami.service: Control process exited, code=exited status=1
Dec 01 23:50:13 ip-10-0-4-140 systemd[1]: Failed to start LSB: Bitnami Init Script.
Dec 01 23:50:13 ip-10-0-4-140 systemd[1]: bitnami.service: Unit entered failed state.
Dec 01 23:50:13 ip-10-0-4-140 systemd[1]: bitnami.service: Failed with result 'exit-code'.
Seems to be an error with the htaccess file perhaps?
Found that it was the htaccess file that was wrongly configured, have not added the file path in wordpress-htaccess.conf
But I need to add the following to the wordpress-htaccess.conf:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
I understand that I need to add a <Directory "installdir/apps/wordpress/htdocs">
or similar, but what is the correct path?
But the site is up and running again, thats good 