Category Archives: apache-directory

Apache application in subfolder

I put my application in a subfolder "subfolder" of Apache so I can use a url such as: instead of

I'm using the following Directory configuration:

Alias /subfolder /srv/apache2/htdocs/subfolder
<Directory /srv/apache2/htdocs/subfolder>
    Order allow,deny
    Allow from all
    Options All
    AllowOverride All
    Require all granted

The problem is that now I have many broken links and not found resources showing errors such as: 
Failed to load resource: the server responded with a status of 404 (Not Found)

Note that such links in the errors do not contain "subfolder" in the path.

What am I missing?

Error opening ports for Apache Directory LDAP Connection?

I am configuring an Esri Geoportal Server on my machine and have installed Apache Directory Studio to set up the LDAP connection; however when checking my network parameters I receive the following error messages for connection failed. I have configured the Inbound rules via Windows Firewall for ports 389 and 10389, but to no avail. When using netstat -an in CMD I neither of these ports appear as listening or established. What is the best way to open either of these ports?

`The connection failed
 - localhost:389
  javax.naming.CommunicationException: localhost:389 [Root exception is Connection refused: connect]
    at com.sun.jndi.ldap.Connection.<init>(Unknown Source)
    at com.sun.jndi.ldap.LdapClient.<init>(Unknown Source)
    at com.sun.jndi.ldap.LdapClient.getInstance(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.ldap.InitialLdapContext.<init>(Unknown Source)
    at org.eclipse.jface.operation.ModalContext$
Caused by: Connection refused: connect
    at Method)
    at Source)
    at Source)
    at Source)
    at Source)
    at Source)
    at Source)
    at Source)
    at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.jndi.ldap.Connection.createSocket(Unknown Source)
    ... 20 more


How to put username with backslash in

I have an issue with LDAP connection. When I try to connect with apache directory studio desktop I succesfully autheticate. But when I try to do this with Java it fails. I think that the problem is in username which contains backslash "\".

LdapConnection connection = new LdapNetworkConnection(ldapIp, ldapPort);
connection.bind( "uid=foo\\bar,ou=example,dc=example,dc=com", "mysEcretpa55" );

In this case it say that

Exception in thread "main" unexpected token: b

When I put 4 slashes it say:

LdapErr: DSID-0C0903C8, comment: AcceptSecurityContext error, data 52e, v2580

I read that 52e is an error of bad credentials. I'll repeat again that I verified in apache directory studio desktop application and it works fine.