4

I have a LAMP configurated server AMD64 with Ubuntu 14.04 and Apache2 on an EC2 instance.

I followed the official guide here, so first

I downloaded the sitemap_linux-x86_64-beta1-20091231.tar.gz and unpacked it

Then I typed sudo sitemap-install/install.sh –-apache-bin=/usr/sbin/apache2 and here comes my problem:

What is the location of the Apache binary or control script?
[/usr/sbin/apache2] should support -V option.
/usr/sbin/apache2 is not a supported Apache binary or control script.

I'm sure about the location, infact if I restart Apache from the log file I can see AH00094: Command line: '/usr/sbin/apache2'. I have also tried using this as location /usr/sbin/apache2ctl but no way.

I tried searching on Google for days without find anything.

Why I cannot install the Google Sitemap Generator using /usr/sbin/apache2 as location of my Apache?

UPDATE

if I type apache2 -V the output is a list of warning Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} but it's because the request output from the /usr/sbin/apache2 binary directly and so the /etc/apache2/envvars file isn’t sourced as explained here

John Conde
  • 217,595
  • 99
  • 455
  • 496
NineCattoRules
  • 2,253
  • 6
  • 39
  • 84

2 Answers2

2

Doesn't the documentation say to use -a and not --apache-bin, so you should be doing:

sudo sitemap-install/install.sh –a /usr/sbin/apache2

Both my apache2 binary and my apache2ctl control script understand the -V argument:

root@:~# apache2 -V
Server version: Apache/2.2.22 (Ubuntu)
Server built:   Jul 24 2015 17:25:42

root@:~# apache2ctl -V
Server version: Apache/2.2.22 (Ubuntu)
Server built:   Jul 24 2015 17:25:42
user2926055
  • 1,963
  • 11
  • 10
  • I tried your solution, same error `[/usr/sbin/apache2] should support -V option.` – NineCattoRules Mar 01 '16 at 19:00
  • if I type `apache2 -V` the output is a list of warning `Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}` but it's because the request output from the `/usr/sbin/apache2` binary directly and so the `/etc/apache2/envvars` file isn’t sourced as explained [here](http://www.howdididothat.info/2014/10/07/invalid-mutex-directory-in-argument-file/) – NineCattoRules Mar 01 '16 at 19:07
  • You're not typing those square brackets `[` and `]` in anywhere, right? Just making sure... :-) – user2926055 Mar 02 '16 at 00:12
  • that is the error message, no I'm not typing square brackets – NineCattoRules Mar 02 '16 at 09:19
1

Looks to me like you should be doing this:

sudo sitemap-install/install.sh –-apache-bin=/usr/sbin/apachectl

Also the /usr/sbin/apachectl is likely a soft link so just run an ls -la on that if you want to know the real location.

Barry Pollard
  • 40,655
  • 7
  • 76
  • 92
  • `apachectl -> apache2ctl` located in the same folder, but also using this `/usr/sbin/apache2ctl` I get the same problem `[/usr/sbin/apache2ctl] doesn't point to a supported Apache instance. /usr/sbin/apache2ctl is not a supported Apache binary or control script.` – NineCattoRules Feb 28 '16 at 11:13
  • Then that cannot be how you are restarting Apache. – Barry Pollard Feb 28 '16 at 11:15
  • `sudo service apache2 restart` then I tried again the installation and same problem...from the `error.log` Apache has started `AH00094: Command line: '/usr/sbin/apache2'` so the location is correct, then why I cannot use `/usr/sbin/apache2` for install this sitemap generator? – NineCattoRules Feb 28 '16 at 11:25
  • Well if you are using service to start it then apache2 should be in /etc/init.d or perhaps /etc/init depending on which flavour of Linux you're running. A quick Google gives this which should set you on your way: https://www.digitalocean.com/community/tutorials/how-to-configure-a-linux-service-to-start-automatically-after-a-crash-or-reboot-part-1-practical-examples – Barry Pollard Mar 07 '16 at 22:28
  • I don't have any problem with my server, I'm running Ubuntu 14.04 as OS, but again my Apache and all my server are configured perfectly – NineCattoRules Mar 08 '16 at 16:37
  • Sorry wasn't clear. That link, if you scroll down, explains how the "system" command works and what executable it actually calls. Which might help you figure out how your Apache runs, which should help with your problem. – Barry Pollard Mar 08 '16 at 16:39
  • Apache already runs without problems, and I already have the necessary knowledge for those commands. It's something else – NineCattoRules Mar 08 '16 at 16:47
  • Well it seems to me from above that you don't know which command to use to start Apache outside of the "system" way of starting it and that is the core of the problem? Or am I misunderstanding. – Barry Pollard Mar 08 '16 at 16:57
  • Could be related to my EC2 instance instead? – NineCattoRules Mar 08 '16 at 17:03