403 error in opensuse while using htaccess files

403 error in opensuse while using htaccess files

Configuring url rewriting in apache 2.4 in opensuse might not be that easy after all. First you need to follow these set of instructions. This will work perfectly for older versions of apache. But getting them to work for apache 2.4 might require a bit of extra work. In this post we will discuss how to resolve 403 error in opensuse while using htaccess files.

In apache 2.4, url rewriting might result into error 403. To resolve this, there are two options

  1. Add Options +FollowSymLinks at the top of your .htaccess files.
  2. Edit apache configuration file. To do this, follow these steps

Resolve 403 error in opensuse while using htaccess files

  • Open /etc/apache2/default-server.conf
  • Look up your document root. The document root will be mentioned after the DocumentRoot directive, something like
DocumentRoot "/srv/www/htdocs"
  • Search for the lines similar to
<Directory "/srv/www/htdocs">;
  • Look for the Options directive
  • If you are running into 403 error, chances are you have in your configuration file
Options None

 

  • Change that to
Options FollowSymlinks
  • Save the file and restart the apache by opening terminal and typing
sudo systemctl restart apache2.service

This should resolve the 403 error in apache 2.4 in opensuse.

snapshot1