Apache error .htaccess: RewriteEngine not allowed here [solved]

Referred from: http://kx.cloudingenium.com/linux/apache-web-server/solve-apache-error-htaccess-rewriteengine-allowed/

from:  http://Technology.Bauzas.com/…

 

I turned on some .htaccess rules in order for the cache to perform faster but unfortunately it came with some unintended consequences: A bunch of 500 error pages and in the log files one of the errors was [Core:Alert] /../.htaccess: RewriteEngine not allowed here, referrer: http://Technology.Bauzas.com/…

The reason RewriteEngine is not allowed is because changing configuration settings via .htaccess files is disabled for security reasons by default. If you get an Internal Server Error screen shown on your browser (or 500 error page) and you have the message “htaccess: RewriteEngine not allowed here” in your Apache error.log (ususally found at /var/log/apache2/error.log), you will need to enable support for it via the virtual host config file.
Simply add or update the line AllowOverride to include FileInfo to your Apache virtual host, the vhost configuration file should then look like

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride FileInfo
    Order allow,deny
    allow from all
</Directory>

If you had other AllowOverride directives you only need to add the FileInfo one. The order I think does not matter. Also, there is no need to add Allowoverride All instead of FileInfo to your vhosts file. While it will also work as it allows ALL directives, you are exposing yourself to more than just rewriting URLs and could therefore be a security risk. Is like opening all the ports in your firewall vs just the one you need.

HOWTO WL sta driver / Broadcom b43xx (wlan) driver

Copy/PASTE from wiki.debian

wl

Translation(s): English – Español – Français – 简体中文

Broadcom BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227, BCM43228 devices (wl)

This page describes how to enable support for WiFi devices based on Broadcom wireless LAN chips, using the vendor driver on Debian systems.

Tabla de Contenidos
Broadcom BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227, BCM43228 devices (wl)
Installation
Debian 7 “Wheezy”
Debian 6.0 “Squeeze”
Known Issues
Supported Devices
See Also
External Links
The proprietary Broadcom wireless LAN driver (wl, aka broadcom-sta) provides support for some Broadcom-based PCI/PCIe hardware. It includes a binary-only component targeted for the x86 or x86-64 architecture. Supported devices are listed at the end of this page.

The driver depends on the x86 or x86-64 architecture (Debian i386 and AMD64 ports respectively).

{i} The BCM4313, BCM43224 and BCM43225 chips are alternatively supported by the brcmsmac driver. The BCM4311 and BCM4312 chips are alternatively supported by the b43 driver.

{i} As of Debian 7 “Wheezy”, the BCM4321 and BCM4322 chips are alternatively supported by the b43 driver.

Installation

Debian 7 “Wheezy”

Add a “non-free” component to /etc/apt/sources.list, for example:
# Debian 7 “Wheezy”
deb http://http.debian.net/debian/ wheezy main contrib non-free
Update the list of available packages. Install the relevant linux-headers and broadcom-sta-dkms packages:
# apt-get update
# apt-get install linux-headers-$(uname -r|sed ‘s,[^-]*-[^-]*-,,’) broadcom-sta-dkms
This will also install the recommended wireless-tools package. DKMS will build the wl module for your system.
Unload conflicting modules:
# modprobe -r b44 b43 b43legacy ssb brcmsmac
Load the wl module:
# modprobe wl
Configure your wireless interface as appropriate. See also known issues.

Debian 6.0 “Squeeze”
Add a “non-free” component to /etc/apt/sources.list, for example:
# Debian 6.0 “Squeeze”
deb http://http.debian.net/debian/ squeeze main contrib non-free
Update the list of available packages. Install the module-assistant and wireless-tools packages:
# apt-get update
# apt-get install module-assistant wireless-tools
Build and install a broadcom-sta-modules-* package for your system, using Module-Assistant:
# m-a a-i broadcom-sta
Blacklist the brcm80211 module, to prevent it conflicting for support of BCM4313, BCM43224 and BCM43225 devices:
# echo blacklist brcm80211 >> /etc/modprobe.d/broadcom-sta-common.conf
Rebuild your initial ramdisk, to blacklist modules defined at /etc/modprobe.d/broadcom-sta-common.conf within initramfs:
# update-initramfs -u -k $(uname -r)
Unload conflicting modules:
# modprobe -r b44 b43 b43legacy ssb brcm80211
Load the wl module:
# modprobe wl
Configure your wireless interface as appropriate. See also known issues.

Known Issues

The Sonics Silicon Backplane driver (ssb) conflicts with the wl driver (545388).
b44, b43, b43legacy and ssb are blacklisted by default as of broadcom-sta 5.10.91.9.3-3 (brcm80211 and brcmsmac since 5.100.82.38-1, 5.100.82.38-2 respectively).
This prevents use of any Ethernet device supported by b44.
Frequent disconnections can be experienced. This may be resolved by disabling power management via:
iwconfig(8) (e.g. iwconfig eth1 power off)
laptop-mode-tools: set WIRELESS_BATT_POWER_SAVING=0 within /etc/laptop-mode/conf.d/wireless-power.conf
Monitor mode is not supported prior to driver version 5.100.82.111.
Debian 7 “Wheezy” users, see /usr/share/doc/broadcom-sta-{dkms,source}/README.txt.gz to enable.
Wireless channels 12 and 13 are not available for use (636119).
Inability to join networks with hidden SSIDs (698697).
Upgrading from Debian 6.0 “Squeeze” to Debian 7 “Wheezy” may require network configuration amendment (648396).
See bugs reported on broadcom-sta.

Supported Devices

The page HowToIdentifyADevice/PCI explains how to identify a PCI device.

The following list is based on the alias fields of modinfo wl built from wheezy/broadcom-sta-dkms:

PCI: 14E4:0576 Broadcom Corporation BCM43224 802.11a/b/g/n
PCI: 14E4:4311 Broadcom Corporation BCM4311 802.11b/g WLAN
PCI: 14E4:4312 Broadcom Corporation BCM4311 802.11a/b/g
PCI: 14E4:4313 Broadcom Corporation BCM4311 802.11a
PCI: 14E4:4315 Broadcom Corporation BCM4312 802.11b/g LP-PHY
PCI: 14E4:4328 Broadcom Corporation BCM4321 802.11a/b/g/n
PCI: 14E4:4329 Broadcom Corporation BCM4321 802.11b/g/n
PCI: 14E4:432A Broadcom Corporation BCM4321 802.11an Wireless Network Controller
PCI: 14E4:432B Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller
PCI: 14E4:432C Broadcom Corporation BCM4322 802.11b/g/n
PCI: 14E4:432D Broadcom Corporation BCM4322 802.11an Wireless Network Controller
PCI: 14E4:4353 Broadcom Corporation BCM43224 802.11a/b/g/n
PCI: 14E4:4357 Broadcom Corporation BCM43225 802.11b/g/n
PCI: 14E4:4358 Broadcom Corporation BCM43227 802.11b/g/n
PCI: 14E4:4359 Broadcom Corporation BCM43228 802.11a/b/g/n
PCI: 14E4:435A Broadcom Corporation (Device name unknown)
PCI: 14E4:4727 Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller
PCI: 14E4:A99D Broadcom Corporation (Device name unknown)

See Also

bcm43xx – Broadcom 43xx wireless devices
brcm80211 – Broadcom BCM4313, BCM43224, BCM43225 devices
How to use a WiFi interface
NDISwrapper
External Links

http://www.broadcom.com/support/802.11/linux_sta.php – 802.11 Linux STA driver

Apache2 – VirtualHost (vhost.conf) overview

Hi there!
Here´s a tip to configure virtualhosts over apache2.

2 Ways:
By IP

ServerAdmin nomail@gnomail.com
DocumentRoot /var/www/server.ip1
# ServerName http://www.serverip1.com #optional
ErrorLog /var/www/serverip1/logs/errors_server.log
CustomLog /var/www/serverip1/logs/clients_registry.log common

Order Allow,Deny
Allow from All
#Order Deny,Allow

# Remind to create “logs” folder !

# asign eth0 the other IP address
# #ifconfig eth0:0 100.100.100.198 netmask 255.255.255.0 # as root

#***disable firewall and restart apache
#iptables -F #flushes firewall rulez
#service httpd restart #restarts apache service

…………………………………………………………………………………

#Virtual Web Server – Name Based

NameVirtualHost *:80 # must be enabled by removing # as comment.

ServerAdmin nomail@gnomail.com
DocumentRoot /var/www/servername1
# ServerName http://www.serverip1.com #optional
ErrorLog /var/www/servername1/logs/errors_server.log
CustomLog /var/www/servername1/logs/clients_registry.log common

Order Allow,Deny
Allow from All
#Order Deny,Allow

-For testings from browser, you must to add into C:\Windows\System32\drivers\etc
“hosts” file, servr´s ip and virtualhost´s name (servername1) at the end of file.
ie: 100.100.100.168 http://www.servername1.com

#***disable firewall and restart apache
#iptables -F #flushes firewall rulez
#service httpd restart #restarts apache service

“The Alias directive in … will probably never match because ir overlaps an earlier Alias” [solved] [solucionado]

Suele aparecer este mensaje cuando le hacemos algo al apache2.

$ sudo service apache2 restart
* Restarting web server apache2 [Wed May 08 11:55:52 2013] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
… waiting [Wed May 08 11:55:54 2013] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
[ OK ]

Esto es que phpmyadmin se carga dos veces.
En /etc/apache2/conf.d/phpmyadmin.conf
y en /etc/apache2/apache2.conf que aparece así “include /etc/phpmyadmin/apache.conf” que suele estar en la última línea.

Para que esto se resuelva.
Comentar o borrar/Comment or delete
/etc/apache2/apache2.conf
#include /etc/phpmyadmin/apache.conf
Con “#” al principio de la línea se comenta la misma y queda deshabilitada (disabled)

Un saludo.-

Recuperar Contraseña Root – Linux

Si, nos suele pasar a quien más cauto o desprevenido de olvidar o perder la clave de root.

Para entrar por la puerta trasera debemos seguir estos pasos:
Editamos arranque de GRUB
1.1 Pulsamos en GRUB la tecla “e”
1.2 En la línea “linux /boot/vmlinuz-2.6.xxxx …blablabla..” agregamos “init=/bin/bash” (sin las comillas)
1.3 Pulsamos CTRL+X para iniciar con estos parámetros modificados.

Remontamos el la partición y cambiamos la clave.
Ya en el shell “remontamos”
2.1 #mount -n -o remount,rw /
2.2 # passwd
2.3 (escribimos la nueva clave)
2.4 #sync | reboot

De esta manera al final sincronizamos datos y se reinicia el sistema.

Casuísticas:
a) Sino cambia la clave
hay que verificar que escribimos bien para remontar la partición en modo lectura/escritura.
b) sino reinicia
reiniciar a la vieja usanza. Desconectar y volver a iniciar.
Tiene sus riesgos. Se puede romper la partición.
Si sincronizamos datos los riesgos se minimizan.
Y si volvemos a remontar en sólo lectura se minimizan aún más.
# mount -n -o remount,r /

Esta información se utiliza bajo responsabilidad exclusiva de cada uno, de tal manera que sólo informo y me desligo de responsabilidades sobre el uso indebido que se haga de la misma.
En este caso se sugiere securizar el GRUB para evitar este tipo de artimañas.

Packet Tracer se cierra / shuts down by itself

Solución / Solution (solved)

$nano $packet_inst/packettracer

#!/bin/bash
echo Starting Packet Tracer 5.3

PTDIR=/opt/pt /dev/null
/opt/pt/bin/PacketTracer5 “$@” /dev/null 2>&1
_^ __^_
actualizar ruta / update path (packet_inst)

popd > /dev/null

Si copias y pegas mirá que esté todo bien copiado.
If copy/paste, Check characters pasted.

Hope enjoy it.-

Java 7 para Debian/Ubuntu (distro deb based)

Buenas vamos a ver cómo instalar Java 7 para linux Debian/Ubuntu (en tres modalidades, A, B y C)

A) (forma corta)
Descargar el binario correspondiente a la arquitectura desde aquí y descomprimirlo a la carpeta personal.
Luego hacemos en la terminal
sudo mv jdk1.7.0/ /usr/lib/jvm
sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/jre/bin/java 3

sudo update-alternatives –config java
En la lista seleccionamos el número correspondiente a nuestra instalación y listo (el pollo pelada la gallina).

B)Desde entorno gráfico, abrimos una consola (xterm por ejemplo) y nos ponemos como root

$su (luego nos pide la clave de usuario root y continuamos)
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" > /etc/apt/sources.list.d/webupd8team-java.list

Escribimos lo siguiente:
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list.d/webupd8team-java.list

Vamos al cuarto paso.
4) Añadimos la llave de seguridad del repositorio:
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886

5) Luego de añadir la llave de seguridad actualizamos el sistema:
# apt-get update

6) Instalamos Oracle Java 7:
apt-get install oracle-java7-installer

Y deberíamos ver en pantalla lo siguiente:

C) Forma larga.
ver en http://manualinux.heliohost.org/java.html

Fuentes: (a las que les estoy muy agradecido)
*********************************************
A) http://planetadiego.com/2011/07/31/instalar-java-7-s-e-en-linux/
B.1) http://www.glatelier.org/2012/07/tip-como-instalar-oracle-java-7-en-debian-desde-repositorios/
B.2) http://ppa.launchpad.net/webupd8team/java/
C) http://manualinux.heliohost.org/java.html

alexweb.-