You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wiki-changes@httpd.apache.org by Apache Wiki <wi...@apache.org> on 2008/06/26 10:27:40 UTC

[Httpd Wiki] Update of "ApacheVirtualHostMysql/ftp.tmpl" by sjorge

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.

The following page has been changed by sjorge:
http://wiki.apache.org/httpd/ApacheVirtualHostMysql/ftp%2etmpl

New page:
{{{
# FTP Server
<IfDefine FTP>
	<VirtualHost *:21>
		ServerName %name%:21
		ErrorLog "%host_dir%/%name%/_sys/logs/error_log"
		CustomLog "%host_dir%/%name%/_sys/logs/access_log_ftp" ftp_log

		DocumentRoot "%host_dir%/%name%"
		DirectoryIndex ftp_index_list

		# mysql connection
		DBDriver mysql
		DBDParams "host=%db_server% dbname=%db_name% user=%db_user% pass=%db_pass%"
		DBDPersist On
		DBDMin 1
		DBDKeep 2
		DBDMax 2
		DBDExptime 60			

		# ftp specific
		FTP On
		FTPOptions VirtualHostByUser StripHostname		

		#FTPUmask             022
		#FTPTimeoutLogin      120
		FTPTimeoutIdle       600
		FTPMaxLoginAttempts    3

		<Directory "%host_dir%/%name%">
			Options FollowSymLinks
			AllowOverride none
			order allow,deny
			Allow from All

			# Authentication
			AuthName "FTP Authentication"
			AuthType basic
			AuthBasicProvider dbd
			AuthDBDUserPWQuery "SELECT password FROM users WHERE (groups = 'ftp' or groups LIKE '%,ftp' or groups LIKE 'ftp,%' or groups LIKE '%,ftp,%') AND host = %id% AND name = %s;"
			Require valid-user

			#Remove filter for dynamic content
			RemoveHandler .pl .cgi .shtm .shtml
			RemoveHandler .php .phps
			<Files ~ "^\.ht">
				Order allow,deny
				Allow from all
			</Files>
		</Directory>
		
	</VirtualHost>
</IfDefine>
}}}