Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 15th February 2007, 12:16
Ovidiu Ovidiu is offline
Senior Member
Join Date: Sep 2005
Posts: 1,269
Thanks: 84
Thanked 25 Times in 21 Posts
Question howto add these apache directives?

I need one folder i.e. /var/www/web1/web/folder/ to have these directives applied to:

# Disable listing of user files
DirectoryIndex index.php
# Options -Indexes

# Disable php in userfiles directory (recommended!!!!)
# RemoveType php
# <IfModule mod_php4.c>
# php_flag engine 0
# </IfModule>

<IfModule mod_php5.c>
php_flag engine 0

# GET requests only
<LimitExcept GET>
Order Allow,Deny

# This file MUST be in the user files directory in order for bandwidth tracking to work.
# Bandwidth tracking requires your server to have the mod_rewrite module enabled. If you do not have it,
# you will probably get some Internal Server Error messages.
# To disable bandwidth tracking, comment out the lines below that start with Rewrite...or delete everything from here (this line).
# The file.php path MUST be correct in order for bandwidth tracking to work correctly.
# You can use either relative or absolute path. If none works try entering the FULL url
# to file.php as in this example below:
# EXAMPLE ONLY: RewriteRule ^([0-9]+)/(.+)$ http://celerondude.com/uploaderv6/file.php?userid=$1&file=$2 [L,NC]

# Turn on mod_rewrite
RewriteEngine On

# This block will disable image hotlinking. The images will only be viewable
# through a page on your site. This will enable you to put ads or whatever you want
# around the image. If you disable this, the images can be viewed directly.
# To disable, comment out the two lines below.
# Enter your domain name in the line that starts with RewriteCond. Here are some examples:
# Example 1: RewriteCond %{HTTP_REFERER} !^http://(www\.)?celerondude\.com/? [NC]
# Example 2: RewriteCond %{HTTP_REFERER} !^http://(www\.)?google\.com/? [NC]
# If you get a 404 error, enter the absolute path to view.php instead of just ../view.php.
# RewriteCond %{HTTP_REFERER} !^http://localhost/? [NC]
# RewriteRule ^([0-9]+)/(.+)$ ../view.php?userid=$1&file=$2 [L,NC]

# Use the uploader to view the image instead of viewing it directly.
# If you get a 404 error, enter the absolute path to view.php instead of just ../view.php.
RewriteRule ^view/([0-9]+)/(.+\.(jpe?g|gif|bmp|png))$ ../view.php?userid=$1&file=$2 [L,NC]

# Very important, do not remove. Required for bandwidth tracking.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^([0-9]+)/(.+)$ ../file.php?userid=$1&file=$2 [L,NC]
btw. the subdomain folder.domain.com serves its files from this folder by an entryinside .htaccess using a rewrite.

can you give me some hints? maybe some parts of the directives are unnecesary? I am using a perfect debian 3.1 install with latest ispconfig.
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Add user 'apache' into new group asyadiqin Installation/Configuration 4 16th November 2007 17:59
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 16:47
HowTo Add Mailfiltering to the Falko howto Postfix Guide rockwilda HOWTO-Related Questions 15 20th October 2006 16:40
Apache Directives vs PHP Safe Mode heri Installation/Configuration 1 11th May 2006 19:07
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 01:45

All times are GMT +2. The time now is 15:45.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.