• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question [12.5.30] Vhosts logs location confusion

burnley

Regular Pleskian
First of all, sorry if this has been answered before, or it's documented in one of the Plesk manuals and I missed it, however I'm trying to understand how the virtual hosts logs location is set up in Plesk.
Just yesterday we've notices something NQR with several newly deployed vhosts. Say the domain name is dom1.com, Plesk appears to configure 2 logs locations:
1. /var/www/vhosts/dom1.com/logs
2. /var/www/vhosts/system/dom1.com/logs

For an older vhost both locations contain similar access_log & error_log files. In fact, stat shows the same inode is used for the files:
[root@host01 ~]# stat /var/www/vhosts/system/dom1.com/logs/access_log
File: ‘/var/www/vhosts/system/dom1.com/logs/access_log’
Size: 3545 Blocks: 8 IO Block: 1048576 regular file
Device: 27h/39d Inode: 4587694 Links: 2
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-01-17 09:32:36.997927209 +1100
Modify: 2017-06-15 14:41:08.559628129 +1000
Change: 2017-06-15 14:41:08.559628129 +1000
Birth: -
[root@host01 ~]# stat /var/www/vhosts/dom1.com/logs/access_log
File: ‘/var/www/vhosts/dom1.com/logs/access_log’
Size: 3545 Blocks: 8 IO Block: 1048576 regular file
Device: 27h/39d Inode: 4587694 Links: 2
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-01-17 09:32:36.997927209 +1100
Modify: 2017-06-15 14:41:08.559628129 +1000
Change: 2017-06-15 14:41:08.559628129 +1000
Birth: -
And for the directories:
[root@host01 ~]# stat /var/www/vhosts/dom1.com/logs
File: ‘/var/www/vhosts/dom1.com/logs’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 27h/39d Inode: 5899021 Links: 2
Access: (0700/drwx------) Uid: (10125/dom1com_ftp) Gid: ( 0/ root)
Access: 2017-01-17 09:13:36.685024680 +1100
Modify: 2017-06-15 00:09:15.993419145 +1000
Change: 2017-06-15 00:09:15.993419145 +1000
Birth: -
[root@host01 ~]# stat /var/www/vhosts/system/dom1.com/logs
File: ‘/var/www/vhosts/system/dom1.com/logs’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 27h/39d Inode: 4587654 Links: 2
Access: (0700/drwx------) Uid: ( 994/ psaadm) Gid: ( 0/ root)
Access: 2017-01-17 09:13:36.505021705 +1100
Modify: 2017-06-15 01:38:46.375932276 +1000
Change: 2017-06-15 01:38:46.375932276 +1000
Birth: -

Now, for a new vhost, called dom2.com, the one created yesterday, we still have the 2 directories:
[root@host01 ~]# stat /var/www/vhosts/dom2.com/logs
File: ‘/var/www/vhosts/dom2.com/logs’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 27h/39d Inode: 30544043 Links: 2
Access: (0700/drwx------) Uid: (10212/dom2com_ftp) Gid: ( 0/ root)
Access: 2017-06-14 11:26:57.018088110 +1000
Modify: 2017-06-14 11:26:57.018088110 +1000
Change: 2017-06-14 11:26:57.036088413 +1000
Birth: -
[root@host01 ~]# stat /var/www/vhosts/system/dom2.com/logs
File: ‘/var/www/vhosts/system/dom2.com/logs’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 27h/39d Inode: 8783497 Links: 2
Access: (0700/drwx------) Uid: ( 994/ psaadm) Gid: ( 0/ root)
Access: 2017-06-14 11:26:56.789084247 +1000
Modify: 2017-06-15 10:44:03.708530472 +1000
Change: 2017-06-15 10:44:03.708530472 +1000
Birth: -

The problem is, for dom2.com, /var/www/vhosts/dom2.com/logs is empty, no log files are created, however /var/www/vhosts/system/dom2.com/logs contains the log files I'm excepting there.

My first question: how are the 2 log locations implemented? One directory can't be hardlinked to the other, how can both directories contain the same access_log and error_log files?
The second question, which will probably be answered after knowing the answer to the first one :) How can I fix dom2.com logs so that the files appear in both /var/www/vhosts/dom2.com/logs and /var/www/vhosts/system/dom2.com/logs locations?
 
Maybe something was disturbing the vhost relink script. You can try
# /usr/local/psa/bin/repair --update-vhosts-structure
 
Back
Top