Arquivo da categoria: Servidor

Dando alto start no Tomcat caso esteja fora do AR

#!/bin/bash
r=`wget -q localhost:8080`
if [ $? -ne 0 ]
  then /opt/tomcat/bin/startup.sh
  else echo "OK"
fi

Depois de criar esse arquivo dê permissão de executável.

sudo chmod +x arquivo.sh

Para finalizar coloque ele para ser chamado no crontab.

Apache localhost/~username/ not working

Looks like you need to uncomment the following:

#LoadModule userdir_module libexec/apache2/mod_userdir.so

and

#Include /private/etc/apache2/extra/httpd-userdir.conf

Then in httpd-userdir.conf you may need to uncomment:

#Include /private/etc/apache2/users/*.conf

Lastly you would need to create /private/etc/apache2/users/kevin.conf if it doesn’t exist. I think it should look something like this:

<Directory "/Users/kevin/Sites/">
  Options Indexes MultiViews
  AllowOverride None
  Require all granted
</Directory>

Make sure to restart the Apache server afterwards with:

sudo apachectl restart