I have a multisite WordPress installation. the main site runs off a plain domain, call it domain.com. The other site runs on a subdomain, say sub.domain.com. I had this all working fine on another server using Symbiosis, so I don’t think there’s any problem with the WP side of things. And the main site is still running running perfectly well on its new server.
DNS records for the main domain and the subdomain are correctly pointing to the new server. I made the subdomain on the server by creating these directories and links:
/srv/sub.domain.com /srv/sub.domain.com/public /srv/sub.domain.com/public/htdocs -> /srv/domain.com/public/htdocs
When I run sympl-web-configure, a symlink is created:
/etc/apache2/sites-enabled/sub.domain.com.conf -> /etc/apache2/sites-available/sub.domain.com.conf
Any Error Messages
If I leave the sites-enabled symlink in place, then when I try to acces the subdomain, the browser page is blank, and I get this kind of thing in the subdomain’s error.log:
[Mon Dec 14 15:51:45.384644 2020] [php7:warn] [pid 18744] [client XX.XX.XX.XX:XXXXX] PHP Warning: Unknown: open_basedir restriction in effect. File(/srv/domain.com/public/htdocs/index.php) is not within the allowed path(s): (/srv/sub.domain.com/public/:/srv/sub.domain.com/php_tmp/:/srv/sub.domain.com/php_sessions/) in Unknown on line 0
Obviously open_basedir isn’t noticing that it’s actually the same directory. But, there is no SSL warning when I try https://sub.domain.com, so I think the certificate is properly installed.
Removing the sites-enabled symlink and restarting apache allows the subdomain to be displayed in a browser, and those error messages go away — but SSL doesn’t work. When I try to look at https://sub.domain.com I get a warning that the certificate refers only to the server’s default domain, with no mention of domain.com anywhere.
Any help would be very gratefully received.
- Sympl Version : 10
- Debian Version : Buster
- Hosted On? Bytemark