• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Apache does not restart after moving vhosts to new partition

I

iainad

Guest
Folks:

I've got a fresh Plesk 8.0 install on RH EL 4.0 ES and just moved my vhosts directories from /var/www to /home (following the instructions in the knoledgebase. All seems fine until apache is restarted and I get:

httpd: could not open document config file /home/httpd/vhosts/domain.com/conf/httpd.include

Checking the file shows that it exists, it's permissions are 755 (changing them to 777 makes no difference).

Even if I delete all the domains and start again, Plesk creates the domain directory fine, and all is well to start with, but restarting apache causes this same problem.

I've seen some other threads on the topic but no solutions that work for me. I've tried checking with configtest and all the syntax comes back OK.

Any thoughts before I rebuild the server with a huge /var partition and just leave it as it came ?

Thanks

..Iain
 
All the directories in the tree:

/home
/home/httpd
/home/httpd/vhosts
/home/httpd/vhosts/domain
etc

all have root as owner and group so this doesn't look like it's the problem.

Permissions are all set to 755 and changing them makes no difference (at least on the httpd.include file itself, not tried all directories going down to it).

Any other thoughts ?
 
Take a look at /etc/httpd/httpd.conf at around line 351. Make sure that the DocumentRoot is set properly. If it is not, be sure to change the line (around 376) for Directory to match. There are a couple of other lines in httpd.conf that refer to /var/www.
 
Thanks for this.

I've checked and there are still references to /var/www as I've not moved everything - just the vhosts. DocumentRoot is still set to /var/www/html for example and some of the aliases - e.g. /error/ are still there, however all these are valid locations.

However, I'm not sure that's it and I'd rather not manually change a whole load of individual locations as I'm keen to not break anything else.

It's complaining about the full path file not being openable rather than a relative path which might be affected by other paths in the conf file.

I've also left a symlink in /var/www/ pointing to the new vhosts location so again if any path was left wrong, it should find its way back to the new location.

I'm starting to think that a complete rebuild is the only option with /var as the big partition...
 
Back
Top