Apache mod_rewrite

Apache, Lighttpd, nginx, Cherokee
User avatar
lumio
Posts: 46
Joined: 2008-05-24 16:48
 

Apache mod_rewrite

Post by lumio »

Hey Leuts,
ich hab zum entwickeln meiner webprojekte einen kleinen server eingerichtet, der jetzt bei mir daheim herumsteht.

Hab ganz normal apache und den php eigenen fcgi wrapper in verwendung. Alles klappt wunderbar, allerdings macht mir das rewrite modul von apache jetzt zu schaffen.

Nun will mir apache jedesmal klar machen, dass der Zugriff verweigert wird, weil angeblich SymLinks nicht aktiviert sind, und somit RewriteEngine nicht aktiviert werden darf...
denkste:

Code: Select all

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	
	DocumentRoot /var/www/
	<Directory />
		Options Indexes FollowSymLinks
		AllowOverride All
		Options ExecCGI Indexes
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		Options All
		AllowOverride All
		Order allow,deny
		allow from all
		AddHandler fcgid-script .php
		FCGIWrapper /usr/lib/cgi-bin/php5 .php	
		Options ExecCGI Indexes
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>
Wie ihr sehn könnt ist FollowSymLinks aktiviert -.- aber irgendwie checkt der das nid!

//edit: hab auf google eine "lösung" gefunden, die allerdings nicht wirklich hilft:

Code: Select all

<Files ~ (\.pl)>
Options ExecCGI FollowSymLinks
</Files>

Options +FollowSymLinks +SymLinksIfOwnerMatch
Wenn ich das in die .htaccess schreib, dann werde ich zum root-verzeichnis von apache, also /var/www/ geleitet.

//edit2
Also hab das jetzt gepackt... man sollte keine doppelten Options anführen. Allerdings habe ich jetzt das Problem, dass ich auf /var/www zurückgezogen werd.
Ich poste mal die .htaccess:

Code: Select all

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|favicon\.ico|style|scripts)
RewriteRule ^(.*)$ index.php/$1 [L]