samedi 31 janvier 2015

Rewrite module apache2 on openSUSE 13.2


I don't know exactly how apache2 configuration files work, so probably that's the problem. Maybe someone here could help me? My problem is that I have installed apache2 + php @ opensuse 13.2, I enabled rewrite and userdir modules but the links don't work and I get 404 error.


My part (I think interesting one) of /etc/apache2/default-server.conf looks like this:



DocumentRoot "/srv/www/htdocs"
<Directory "/srv/www/htdocs">
Options None
AllowOverride None
Require all granted
</Directory>

<IfModule mod_userdir.c>
UserDir public_html
Include /etc/apache2/mod_userdir.conf
</IfModule>


mod_userdir.conf file looks like this:



<IfModule mod_userdir.c>
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride All
Options Indexes FollowSymLinks MultiViews

<Limit GET POST OPTIONS PROPFIND>
Require all granted
</Limit>

<LimitExcept GET POST OPTIONS PROPFIND>
Require all denied
</LimitExcept>
</Directory>
</IfModule>


And my .htaccess in ~/public_html looks like this:



Options FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteRule ^404.html$ index.php?page=errors/404 [L]
... and so on.


The .htaccess is correct because links on webserver work. Once I get through a tutorial how to enable mod_rewrite on Ubuntu I just realized that in OpenSUSE it doesn't work.


Artur



Aucun commentaire:

Enregistrer un commentaire