Server Config for Multisites
-
Okay. I have the same problem as at https://www.ads-software.com/support/topic/i-give-up-6. As requested I’ve made my own topic for this (sorry for not doing that)
I have Ubuntu 11.04 with Apache 2, PHP5 and MySQL 5.1 all nicely talking to each other on a very clean install (put together last night). I run a Multi-site configuration with subdomains (they load fine)
I too have permalinks working (domain.com/2011/12/post-title), but most, if not all images refuse to load.
i.e.
https://www.domain.com/wp-content/uploads/2011/06/couple.jpg gives a *wordpress* 404.I’ll post my Apache configuration as I know it’s a configuration issue that I don’t understand where things are wrong. As far as I understand, below is the order in which Apache processes files. Changes I’ve made are noted, and where I’ve altered something, I’ve pasted the entire config file and noted what was changed in the hopes that solving this will help others. I’d appreciate if someone with a working multisite configuration could give this a quick look over and check what I’ve done:
/etc/apache2/apache2.conf
[NO changes]
/etc/apache2/httpd.conf
[BLANK]/etc/apache2/mods-enabled/*.load
[Enabled rewrite using a2enmod]
/etc/apache2/mods-enabled/*.conf
[NO changes]/etc/apache2/ports.conf
[NO changes]/etc/apache2/conf.d/*
[NO changes]/etc/apache2/sites-enabled
[Changes below]- I copied the
000-default
in/etc/apache2/sites-available
tomysite.com
- I added a symlink in
/etc/apache2/sites-enabled/mysite.com
to/etc/apache2/sites-available/mysite.com
- I removed the symlink for
000-default
- I altered the configuration of mysite.com as below. I removed the
/cgi-bin
and/docs
directives as don’t use them to try to simplify things. I also commented out<Directory />
but don’t know if that’s a problem
<VirtualHost *:80> <strong>ServerAdmin [email protected] ServerName mysite.com ServerAlias *.mysite.com</strong> # AMediaCompany: Altered this line below DocumentRoot /var/www/mysite # <Directory /> # Options FollowSymLinks # AllowOverride None # </Directory> # AMediaCompany: Altered this line below <Directory /var/www/mysite> AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
I added my .htaccess as per the norm:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / Options +FollowSymLinks # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
What I know is this. If I alter
mysite.conf
to have ‘AllowOverride none
‘, the images load fine, but the permalinks don’t work (as expected)If I set ‘
AllowOverride FileInfo
‘ I get an internal server error (nothing in Apache logs other than the access log of saying it was an http status code of ‘500’)
Ditto if set only ‘AllowOverride Options
‘So, to me it seems like a server issue and Apache’s thinking files are not found under certain conditions because the 404 gets passed over to wordpress
Edit: clarity (no preview option sometimes makes a large post difficult)
Edit2: can’t bold inside a code tag; added comments which are not in place normally - I copied the
- The topic ‘Server Config for Multisites’ is closed to new replies.