The project at hand: Setup an LDAP directory that will work with Apache2
using basic auth. In other words, I want to protect Apache directories
by forcing users to enter a username/password (using http basic auth)
and have the username and password checked against an ldap server.
Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts
Saturday, February 5, 2011
Wednesday, January 12, 2011
Apache VirtualHost
I'm looking a solution for this one on apache configuration.
Problem: URL : test.sample.org/tes1 = test1.sample.org
and i want to redirect it to test1.sample.org if i have existing sud domain
Below is the solution : I'm running my Apache 2.2 on CentOS 5.0
Server configuration
NameVirtualHost 172.20.30.40
<VirtualHost 172.20.30.40>
# primary vhost
DocumentRoot /www/subdomain
RewriteEngine On
RewriteRule ^/.* /www/subdomain/index.html
# ...
</VirtualHost>
<VirtualHost 172.20.30.40>
DocumentRoot /www/subdomain/sub1
ServerName www.sub1.domain.tld
ServerPath /sub1/
RewriteEngine On
RewriteRule ^(/sub1/.*) /www/subdomain$1
# ...
</VirtualHost>
<VirtualHost 172.20.30.40>
DocumentRoot /www/subdomain/sub2
ServerName www.sub2.domain.tld
ServerPath /sub2/
RewriteEngine On
RewriteRule ^(/sub2/.*) /www/subdomain$1
# ...
</VirtualHost> Reference:
Labels: debian,windows,centos,tool
apache
Subscribe to:
Posts (Atom)