lunes, 26 de septiembre de 2011

PHP ejecutados al ser accedidos con WebDav

Seguí las instrucciones para configurar WebDav en Apache2 (Ubuntu Server 10.04.3 LTS), pero las páginas de PHP eran "ejecutadas" al ser bajadas desde el editor HTML. La configuración (obviando la restricción por IP y usuario/password) era:

    Alias /edit /var/www/www.example.com
    <Location /webdav>
        DAV On
        ForceType text/plain
    </Location>

Revisando la configuración de Apache ví que PHP era habilitado usando "SetHandler", así que lo solucioné usando "SetHandler None":

    Alias /edit /var/www/www.example.com
    <Location /webdav>
        DAV On
        ForceType text/plain
        SetHandler None
    </Location>


jueves, 1 de septiembre de 2011

Desabilitando GDM al inicio

En Ubuntu 11.04 los servicios los arranca Upstart, así que para deshabilitar GDM no se puede borrar el link de /etc/rc2.d/gdm. La forma de hacerlo es editar /etc/init/gdm.conf y agregar "and runlevel RUNLEVEL=5" a la opción "start on". El diff es:


--- a/init/gdm.conf
+++ b/init/gdm.conf
@@ -7,6 +7,7 @@ description     "GNOME Display Manager"
 author         "William Jon McCann "

 start on (filesystem
+          and runlevel RUNLEVEL=5
           and started dbus
           and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
                or stopped udev-fallback-graphics))