Archivos de la categoría ‘Apache’

WAMP Error 403 – Forbidden

Publicado: marzo 8, 2013 en Apache, WAMP

Si te sale el error: Error 403 – Forbidden  al colocar localhost, o cualquier otra direccción, esta es la solución:

  1. abrir el archivo phpmyadmin.conf, ubicado en la carpeta (C:/wamp/alias/phpmyadmin.conf) y sustituir :

Order deny,allow
Deny from all
Allow from 127.0.0.1

por:

Order allow,deny
Allow from all

Y en el archivo httpd.conf, que se encuentra en (C:\wamp\bin\apache\Apache2.2.21\conf), hacia el final sustituir el código:

AllowOverride None
Order deny,allow
Deny from all

por este otro:

AllowOverride All
Order allow,deny
Allow from all

Y reiniciar WAMP

 

Si no te funciona la opciòn anterior en el httpd.conf, solo tienes que cambiar la linea «Require local» que es la última por «Require all granted» del codigo:

<Directory «c:/wamp/www/»>
#
# Possible values for the Options directive are «None», «All»,
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that «MultiViews» must be named *explicitly* — «Options All»
# doesn’t give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be «All», «None», or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
# Online –> Require all granted

#   onlineoffline tag – don’t remove

Require local

</Directory>

Ver Logs Apache Ubuntu 11

Publicado: junio 30, 2011 en Apache, Linux, Ubuntu

Para ver el Log de Apache digitamos en consola:

tail -f  /var/log/apache2/error.log

y salimos con ctrl+z o ctrl+c

Suponemos que tenemos todo instalado Apache,PHP y Mysql.

  1. Instalamos libapache2-mod-auth-mysql: sudo apt-get install libapache2-mod-auth-mysql 
  2. Habilitamos el modulo:
    cd /etc/apache2/mods-enabled
    sudo ln -s /etc/apache2/mods-available/auth_mysql.load
     
  3. Arrancamos Mysql y creamos la base de datos:
    mysqladmin -u root password <password>mysql -uroot -pmysql> grant all on auth.* to auth_user@localhost identified by ‘<password>’;mysql> flush privileges;mysql> create database auth;CREATE TABLE `clients` (
    `username` varchar(25) NOT NULL default »,
    `passwd` varchar(25) NOT NULL default »,
    `groups` varchar(25) NOT NULL default »,
    PRIMARY KEY (`username`),
    KEY `groups` (`groups`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    INSERT INTO `clients` VALUES (‘<username>’, ‘<password>’, ‘<group>’);
  4. Editamos el Archivo de Configuración de Apache apache2.conf:
    Digitamos: sudo nano/etc/apache2/apache2.confAgregamos las siguientes lineas al final del archivo:Auth_MySQL_Info localhost <auth_user> <password>
    <Directory «<web directory>»>
    Options +Indexes FollowSymLinks MultiViews
    AllowOverride AuthConfig Options FileInfo Limit
    Order allow,deny
    Allow from all
    </Directory>

    Ajustamos <auth_user>, <password> y <web directory> escribes en web directoy la direccion de la carpeta que contendrá la seguridad .htaccess ejemplo: <Directory  /var/www/prueba/>

    Reiniciamos apache Apache 2:  sudo  /etc/init.d/apache2 restart

  5. Finalmente colocamos en .htaccess las siguientes lineas:
    AuthMYSQL on
    AuthMySQL_Authoritative on
    AuthMySQL_DB auth
    AuthMySQL_Password_Table clients
    AuthMySQL_Group_Table clients
    AuthMySQL_Empty_Passwords off
    AuthMySQL_Encryption_Types Plaintext
    AuthBasicAuthoritative Off
    AuthUserFile /dev/null
    AuthName «<description>»
    AuthType Basic<Limit GET POST>
    require group <group>
    </Limit>
  6. Para autenticar con varios Grupos hacemos espacio y escribimos el nombre del otro grupo:
    <Limit GET POST>
    require group <group1> <group2>
    </Limit>
     
  7. LISTOO eso es todo….

How to – Habilitar mod_auth_mysql

Publicado: junio 30, 2011 en Apache, Linux, Ubuntu

1. Instalar mod_auth_mysql:

sudo apt-get install libapache2-mod-auth-mysql

2.Enable mode_auth_mysql

cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/auth_mysql.load

Apache ignora .htaccess en Ubuntu 11

Publicado: junio 30, 2011 en Apache, Linux, Ubuntu

Escribo otro de los errores que me pasan y resuelvo como el que no quiere funcionar los .htaccess y la solución es la siguiente:

 

  1. Abrimos el archivo /etc/apache2/sites-available/default con un editor de texto (ej: Nano):
    sudo nano /etc/apache2/sites-available/default
     
  2.  Cambiamos la linea AllowOverride None por AllowOverride All la que se encuentra debajo de Options Indexes FollowSymLinks MultiViews
  3. Reiniciamos sudo /etc/init.d/apache2 reload y listo.