I just figured out how to solve my own problem.

My Apache .conf file was as follows:

<VirtualHost *:80>
        ServerName sycsrt.stoutner.net

        VirtualDocumentRoot /usr/share/wordpress/
        ErrorLog /var/log/apache2/wp-error.log
        TransferLog /var/log/apache2/wp-access.log
</VirtualHost>

When I switched it to the first example, with the lines redirecting for the 
upload folder, it works:

<VirtualHost *:80>
        ServerName sycsrt.stoutner.net

        UseCanonicalName    Off
        VirtualDocumentRoot /srv/www/%0
        Options All

        ErrorLog /var/log/apache2/wp-error.log
        TransferLog /var/log/apache2/wp-access.log

        ServerAdmin so...@stoutner.org

        # Store uploads in /srv/www/wp-uploads/$0
        RewriteEngine On
        RewriteRule ^/wp-uploads/(.*)$ /srv/www/wp-uploads/%{HTTP_HOST}/$1
</VirtualHost>

Also, adding the redirects into the defined virtual host also work:

<VirtualHost *:80>
        ServerName sycsrt.stoutner.net

        VirtualDocumentRoot /usr/share/wordpress/
        ErrorLog /var/log/apache2/wp-error.log
        TransferLog /var/log/apache2/wp-access.log

        ServerAdmin so...@stoutner.org

        # Store uploads in /srv/www/wp-uploads/$0
        RewriteEngine On
        RewriteRule ^/wp-uploads/(.*)$ /srv/www/wp-uploads/%{HTTP_HOST}/$1
</VirtualHost>


I would suggest you update the sample apache.conf file to add these lines into 
the section for a defined virtual host.  :)



## A defined Virtual host

        NameVirtualHost *:80

        <VirtualHost *:80>
        VirtualDocumentRoot /usr/share/wordpress/
        ServerName blog.example.com
        ErrorLog /var/log/apache2/wp-error.log
        TransferLog /var/log/apache2/wp-access.log

        ErrorLog /var/log/apache2/wp-error.log
        TransferLog /var/log/apache2/wp-access.log

        ServerAdmin ad...@example.com

        # Store uploads in /srv/www/wp-uploads/$0
        RewriteEngine On
        RewriteRule ^/wp-uploads/(.*)$ /srv/www/wp-uploads/%{HTTP_HOST}/$1
        </VirtualHost>


Soren

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to