Web&Dev | Partager mes recherches, mise en oeuvre…

oct/09

13

Gestion des hosts virtuels via LDAP

Gestion des hôtes virtuels de Apaches au travers de LDAP http://modvhostldap.alioth.debian.org/

Permet de configurer Apache au travers de la branche ou=vhosts.

En injectant un ldif du type

dn: apacheServerName=blog.webetdev.com,ou=vhosts,dc=webetdev,dc=com
objectClass: top
objectClass: apacheConfig
apacheServerName: blog.webetdev.com
apacheDocumentRoot: /path/siteweb/blog.webetdev.com
apacheServerAdmin: contact@webetdev.com

Ou via PHP

$dn = « apacheServerName= ».$_GET["domaine"]. »,ou=vhosts,dc=domaine,dc=com »;

$info["objectClass"][0] = « top »;
$info["objectClass"][1] = « apacheConfig »;
$info["apacheServerName"] = « blog.webetdev.com »;
$info["apacheDocumentRoot"] = « /path/site/ »;
$info["apacheServerAdmin"] = « contact@webetdev.com »;

ldap_add($ldapLink,$dn,$info);

VN:F [1.9.0_1079]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.0_1079]
Rating: 0 (from 0 votes)

RSS Feed

Pas encore de commentaire.

Leave a comment!

<<

>>

Theme Design by devolux.org

Calendrier

octobre 2009
L Ma Me J V S D
    nov »
 1234
567891011
12131415161718
19202122232425
262728293031  
To top
Better Tag Cloud