1

Trying to set up a Minecraft Technic Solder repository on my home server.

Here is my 000-default.conf in /etc/apache2/sites-available/:

<VirtualHost *:80>
# Host that will server this project.
ServerName 192.168.1.19
ServerAdmin *email*

# The location of public directory.
DocumentRoot /home/evilarceus/TechnicSolder/public/

# Important options for solder public directory
<Directory /home/evilarceus/TechnicSolder/public/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
</Directory>

<Directory "/home/evilarceus/TechnicSolder/public/repo/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Require all granted
</Directory>

# Useful logs for debug.
ErrorLog /home/evilarceus/TechnicSolder/logs/error.log
CustomLog /home/evilarceus/TechnicSolder/logs/access.log combined

The first directory (home/evilarceceus/TechnicSolder/public) works perfectly fine. However, the second directory (where I want my repo to be) shows 403 Forbidden.

Permissions on repo/:

drwxrwxr-x 3 evilarceus evilarceus 4096 Oct  2 19:39 repo

error.log:

[Sun Oct 02 20:39:31.034401 2016] [access_compat:error] [pid 17874] [client 192.168.1.20:50072] AH01797: client denied by server configuration: /home/evilarceus/TechnicSolder/public/repo

I honestly don't know what to do at this point. Help would be appreciated!

2
  • Any chance that there's a symlink in there somewhere? If so, what's the FollowSymlinks set to, higher in the hierarchy? (Sometimes, when in doubt, it's sometimes easier to set a wide-open permission higher in the directory structure (or virtualhost hierarchy) and HUP the server - if that fixes it, you know you're dealing with a plain-old permission issue).
    – RVT
    Oct 4 '16 at 9:32
  • You might also change the "Require all granted" to "Allow from all" and see if that fixes it ... if so, you'll have to dig a little bit deeper in to the "require" for your server version.
    – RVT
    Oct 4 '16 at 9:34
2

Add line Allow from all after Order allow,deny for directory /home/evilarceus/TechnicSolder/public/repo/.

2
  • Hmm, the problem still occurs after that. Instead, it doesn't load the page at all (doesn't even give me the 403). However, if I remove FollowSymLinks and use the solution you provided, it loads the page but still gives 403. Oct 3 '16 at 5:43
  • Please show all files in directory /home/evilarceus/TechnicSolder/public/repo/ and DirectoryIndex directive in httpd.conf. Oct 3 '16 at 14:49
1

This is a very common problem with using apache configuration files that have both v2.4 auth directives and v2.2 ones.

Find all your old Allow, Order, Satisfy and Require directives and change them to the Apache v2.4 Require with options <Require(Any|All|None)> blocks, and then comment out the loading of mod_access_compat. Otherwise you will continue to have unexpected problems, mostly resulting in client denied by server configuration.

Once your config is clean, add any remaining errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.