1. I have 2 ISPConfig 3 servers that are running websites. Server2 mirrors Server1. I created an NFS share on another server because I want to share the /var/www directory so users only have to FTP once. I mounted the NFS share to /var/www in /etc/fstab on both servers, issued a cp -R -p * on my /var/www to the NFS share, then rebooted both servers. Both came up fine sharing the NFS share on /var/www. However, I'm getting 403 Access Denied error messages when accessing any of the sites. I've ensured my users in /etc/passwd match, i.e. web22 (id 1004) is the same on both systems. So I did a chmod 755 recursively on the new /var/www directory and that fixed the error. Now it seems some session issues are appearing in applications like squirrelmail. I haven't setup any load balancing whatsoever. Everything still goes to Server1, so I don't understand why it's having session issues.

    Has anyone done a multiserver setup like this before? Any tips or tricks you can share would be greatly appreciated!

    David
     
  2. update

    Hey all, just a quick update to provide a little more information

    Server1 /var/www/example.com/web/ before the copy:

    drwxr-xr-x 2 web2 client1 4096 2012-01-09 23:07 assets
    drwxr-xr-x 3 web2 client1 4096 2012-01-09 23:07 downloads
    drwxr-xr-x 2 web2 client1 4096 2011-10-16 15:45 error
    -rwxr-xr-- 1 web2 client1 1861 2011-10-16 15:45 index.html
    -rwxr-xr-- 1 web2 client1 1861 2011-10-16 15:45 index.php
    drwxr-xr-x 2 root root 4096 2012-01-10 00:30 stats
    drwxr-xr-x 16 web2 client1 4096 2012-01-09 23:13 webmail

    My NFS is mounted to /home/data
    From /var/www I issue a cp -rp * /home/data/ and this is now the output at /home/data:

    drwxr-xr-x 2 web2 client1 4096 2012-01-09 23:07 assets
    drwxr-xr-x 3 web2 client1 4096 2012-01-09 23:07 downloads
    drwxr-xr-x 2 web2 client1 4096 2011-10-16 15:45 error
    -rwxr-x--- 1 web2 client1 1861 2011-10-16 15:45 index.html
    -rwxr-x--- 1 web2 client1 1861 2011-10-16 15:45 index.php
    drwxr-xr-x 2 root root 4096 2012-01-10 00:30 stats
    drwxr-xr-x 16 web2 client1 4096 2012-01-09 23:13 webmail

    I umount my NFS volume and remount it to /var/www and restart my apache service. That's when the 403 errors start. Cannot access '/'. So I set chmod a+r on index.* and chmod a+x on index.* and it fixes those two files. Now, if I go to Server2 that already has the NFS mounted to /var/www, those chmod updates done from Server1 do not show on Server2. It still shows the two index files as:

    -rwxr-x--- 1 web2 client1 1861 2011-10-16 15:45 index.html
    -rwxr-x--- 1 web2 client1 1861 2011-10-16 15:45 index.php

    So Server2 is giving the 403 error. I fix the perms on Server2 and it works. So after manually adjusting the perms from both servers to the NFS volume, it starts working. Certainly there has to be an easier way to do this. Now each time a file is sent by FTP through one server, the file perms have to be updated from the other server.

    Any ideas? Thanks
     

Share This Page