I am not able to start Apache service in Bitnami wordpress

Keywords: WordPress - OS X - Technical issue - Other
Description:

 Failed to start "apache": cannot start service: httpd.bin: Syntax error on line 564 of /opt/bitnami/apache2/conf/httpd.conf: Syntax error on line 26 of /opt/bitnami/apache2/conf/bitnami/bitnami.conf: Syntax error on line 2 of /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf: Syntax error on line 7 of /opt/bitnami/apps/wordpress/conf/httpd-prefix.conf: Syntax error on line 42 of /opt/bitnami/apps/wordpress/conf/httpd-app.conf: Could not open configuration file /opt/bitnami/apps/wordpress/conf/htaccess.conf: No such file or directory

Did i choose the correct directory file for bnsupport tool?

Hi @roshanghimire857

Thanks for using Bitnami WordPress!

From the error message you reported it seems that the /opt/bitnami/apps/wordpress/conf/htaccess.conf file was removed from your system. You can restore this file using the following command:

$ cp /opt/bitnami/bnsupport/original-data/apps/wordpress/conf/htaccess.conf /opt/bitnami/apps/wordpress/conf/htaccess.conf

Regarding your screenshot, I think you are using an OS X VM. In that case, the bnsupport-tool should be run in the following way:

  1. Open a new terminal https://docs.bitnami.com/installer/faq/osx-vm-faq/administration/access-console-osx-vm/
  2. Execute the following commands from there:
wget -O bnsupport-linux-x64.run https://downloads.bitnami.com/files/bnsupport/latest/bnsupport-linux-x64.run
sudo mkdir /opt/bitnami/bnsupport
sudo mv bnsupport-linux-x64.run /opt/bitnami/bnsupport/
sudo chmod +x /opt/bitnami/bnsupport/bnsupport-linux-x64.run
sudo ln -s /opt/bitnami/bnsupport/bnsupport-linux-x64.run /opt/bitnami/bnsupport-tool

# Run the support tool
sudo /opt/bitnami/bnsupport-tool

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

1 Like

Thank you @jcarmona.
Here’s my code:
157287dc-fd7e-b410-5303-73eb5beb40c7 .
Please have a look.
Thank you

Hi @roshanghimire857

Thanks for the code, I have been able to see the report generated by the tool and it pinpointed the same issue:

  1. The Apache configuration has errors:
httpd.bin: Syntax error on line 564 of /opt/bitnami/apache2/conf/httpd.conf: Syntax error on line 26 of /opt/bitnami/apache2/conf/bitnami/bitnami.conf: Syntax error on line 2 of /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf: Syntax error on line 7 of /opt/bitnami/apps/wordpress/conf/httpd-prefix.conf: Syntax error on line 42 of /opt/bitnami/apps/wordpress/conf/httpd-app.conf: Could not open configuration file /opt/bitnami/apps/wordpress/conf/htaccess.conf: No such file or directory

As previously reported, the /opt/bitnami/apps/wordpress/conf/htaccess.conf file is missing. You can restore this file by opening a new terminal and using the following command:

$ sudo cp /opt/bitnami/bnsupport/original-data/apps/wordpress/conf/htaccess.conf /opt/bitnami/apps/wordpress/conf/htaccess.conf

Once you do that, you may proceed to restart the services:

$ sudo apachectl -t
$ sudo /opt/bitnami/ctlscript.sh restart

Could you please try that and report back?

HI @jcarmona
I am not able to run the code provided. It says Command not found.

Hi @roshanghimire857

You should run the command without the leading $ sign (it is just a common notation to denote that what is behind is meant to be a command and not regular text or is output :slight_smile: )

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

ERROR: Failed to start "apache": cannot start service: Syntax OK
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
AH00015: Unable to open logs

It seems there is another instance/service that is already using the port 8080. You can try the following commands to stop them and restart apache:

$ sudo pkill -f apache
$ sudo pkill -f httpd
$ sudo kill -9 $(sudo lsof -t -i:8080)
$ sudo /opt/bitnami/ctlscript.sh restart apache

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.