I have installed WordPress multisite and my main site is working but the posts and subsite going to 404 I searched a lot and no luck. my Wordpress is configured in the subdi
Fixed this issue by changing php configuration of my server
it was serving php by nginx i changed it to apache and my issue gone.
So I struggled and struggled with this error I'd moved an existing working server to a new Ubuntu 16.xxx server and it all went t***ts up.
Wordpress - MultiSite - SubDomain install Main site working correctly like - www.domain.com
Subdomain sites like testing.domain.com OR www.anotherdomain.com
.htaccess file was all according to the recommended settings wp-config.php all set up similarly
Sites vhost config files for subdomains configured correctly
<VirtualHost *:80>
DocumentRoot /var/www/html/web04
ServerName subsite.domain.uk
ServerAlias www.subsite.domain.uk subsite.web04.domain.uk
ServerAdmin webmaster@domain.uk
<Directory "/websites/www/html/web04">
order allow,deny
Allow from all
AllowOverride All
Options -Indexes +FollowSymlinks
</Directory>
LogLevel debug rewrite:trace8
ErrorLog ${APACHE_LOG_DIR}/subsite-error.log
CustomLog ${APACHE_LOG_DIR}/subsite-access.log combined
</VirtualHost>
THE ISSUE WAS
/etc/apache2/apache2.conf
MAKE SURE THAT THE FOLLOWING LINES ARE CORRECT AND CHANGE THE DEFAULT OF
AllowOverride None to All
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>