apache error 403 Opensuse 13.1

So, a third time, what is the output of:

ls -ld /

Apache works fine in a default installation, without having to do anything except for installing it and enabling the service of course.

It could be that your configuration is invalid though. There have been changes in Apache 2.4 (in comparison to 2.2).
See here: Upgrading to 2.4 from 2.2 - Apache HTTP Server Version 2.5

And AFAIK you shouldn’t use YaST to configure Apache at the moment, as it hasn’t been adapted to Apache 2.4 yet.

But your error message doesn’t really sound like it’s caused by that.

Tomas do you think I need to enable SELinux?

No. That would even restrict your system. But you already have a problem with insufficient permissions.

Your mention of SELinux gave me another idea.

Maybe AppArmor is blocking Apache’s access to the web files?
Try to stop it and see whether it works then:

sudo /sbin/rcapparmor stop

lindx:/srv/www # ls -ld /
drwxr-xr-x 23 root root 4096 Jun 26 10:15 /
lindx:/srv/www # ls -ld /
drwxr-xr-x 23 root root 4096 Jun 26 10:15 /

Well, this is ok as well.

Have you tried to disable AppArmor?

If that doesn’t help, you should maybe completely remove your apache2 configuration, disable the Apache repo, install the standard apache packages that come with openSUSE, and see if it works then without changing anything (especially not in YaST).

sudo rm -r /etc/apache2
sudo zypper in -f apache2-2.4.6 apache2-doc-2.4.6 apache2-example-pages-2.4.6 apache2-utils-2.4.6 apache2-prefork-2.4.6 apache2-mod_perl apache2-mod_php5

As I said, it should work fine out of the box with the default configuration.

You can still make changes to the config afterwards when you’re sure that it’s working.
And then it shouldn’t be hard to revert a config change if you find it not working.

On 2014-06-26 19:06, wolfi323 wrote:

> Code:
> --------------------
> sudo rm -r /etc/apache2
> --------------------

I would also remove the /srv/www directory, or part of it, no?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I don’t think so.
The point is to get a new default configuration.
/srv/www/ doesn’t contain any configuration.

It might be a good idea though to check whether there’s any .htaccess file in the path, as this can of course also change the config and/or prevent access to specific directories. Maybe do that before you try to remove the config and reinstall apache:

find /srv -name .htaccess

On 2014-06-26 20:56, wolfi323 wrote:
>
> robin_listas;2650891 Wrote:

>> I would also remove the /srv/www directory, or part of it, no?
>>
>
> I don’t think so.
> The point is to get a new default configuration.
> /srv/www/ doesn’t contain any configuration.

No, but files with wrong permissions, perhaps. Or on the wrong tree. If
the point is an install from scratch… :-?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

But we already checked that.

User “wwwrun” should have access to /srv/www/htdocs/ (especially /srv/www/htdocs/index.html) and all directories in that tree.

The point for me is not really an install from scratch, but to switch back to the “official” openSUSE 13.1 apache packages with their default configuration. Because I am sure that they work.
I haven’t tried apache 2.4.9 from OBS, and I don’t know whether the YaST HTTP-Server module (which the OP apparently used to configure Apache) fully works with Apache 2.4.
I remember having read some mailing list posts where YaST created a configuration that didn’t work with 2.4. No idea whether this has been fixed yet.

Well, I looked at the whole thread again, and have spotted the problem now:

The ‘x’ bit is missing for the owner, i.e. user wwwrun (Apache).
How could I possibly overlook this the first time? Maybe because he didn’t use CODE tags… :sarcastic:

So @Dexter22, just run this and the error should be gone:

sudo chmod u+x /srv/www/htdocs/