Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Problem with Apache. Can't access directory on other partition
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Problem with Apache. Can't access directory on other partition

MultiMulti Member

Hello guys,

i tried to setup apache2. My setup is Ubuntu x64 running on a hetzner machine with HWR. Apache 2.4.7 is installed and i just cannot make it run -.-

My vhost config: user1.example.com.conf:

<VirtualHost *:80> ServerName user1.example.com ServerAlias www.user1.example.com DocumentRoot /users/user1/ ErrorLog /var/log/apache2/user1.example.com-error.log CustomLog /var/log/apache2/user1.example.com-access.log combined </VirtualHost>

my error log:

[Thu Jan 14 14:05:52.622169 2016] [authz_core:error] [pid 15718:tid 139773511608064] [client >xxx.xxx.xxx.xxx:44754] AH01630: client denied by server configuration: /users/user1/ [Thu Jan 14 14:05:54.064213 2016] [authz_core:error] [pid 15718:tid 139773503215360] [client >xxx.xxx.xxx.xxx:44754] AH01630: client denied by server configuration: /users/user1/favicon.ico, >referer: http://user1.example.com/

I do have that apache installed on my sda volume and i have several partitions on my sdb drive. I mounted the partition in my /etc/fstab

UUID=cd5bd2aa-837b-4bab-a1fb-093b39e58ec4 /users/user1 ext4 defaults 0 0

Permissions should be correct (/users/user1 is owned by www-data:www-data)...

Do you have any ideas what might be the problem?

Comments

  • Well, i cannot edit my post, cause i always get the screen that i am blocked by cloudflare, so ill edit it this way:

    I forgot to mention that my problem is that i always get a 403 error while trying to access user1.example.com. But if i just copy the config and change the directory to a directory in var www its working without problems...

  • goinsj2010goinsj2010 Member
    edited January 2016

    Based on the error log, my guess is that the directory /users/user1 is not listed in the configuration file as a valid location for web files. Inside the <VirtualHost> tags, try adding the following:

    <Directory /users/user1> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

    Don't forget to reload the Apache configuration. Note that you can add other options as well. The example configuration above is fairly restrictive as it will not allow you to use .htaccess files.

    Thanked by 1Multi
  • Really? Are you kidding me?

    Its working now. Havent thought that i need to tell apache to follow symlinks and this stuff. But thank you very much! :)

  • You're welcome, I'm glad that fixed the issue!

Sign In or Register to comment.