WordPress.org

Ready to get started?Download WordPress

Forums

Uploaded pictures cannot be used (1 post)

  1. sgonauer
    Member
    Posted 1 year ago #

    Hi,

    I set-up a word press on Ubuntu 12.10.

    Uploading a picture does succeed : the pictures ends up on the dedicated direcotry on the server

    (I chose /srv/www/wp-uploads in the setting menu).

    The wordpress itself is installed in /usr/share/wordpress.

    Since I chose to have dated directory, I see that wordpress correctly writes into the expected destination.

    However any access to pictures do not word and result in a 404 error

    ls -l /srv/www/wp-uploads/2013/01#
    drwxr-x--- 2 www-data www-data   4096 janv. 20 14:01 ./
    drwxr-x--- 3 www-data www-data   4096 janv. 20 13:50 ../
    -rw-r----- 1 www-data www-data  53553 janv. 20 14:01 diamond-1000x288.jpg
    -rw-r----- 1 www-data www-data  57201 janv. 20 14:01 diamond-1024x335.jpg
    -rw-r----- 1 www-data www-data   8347 janv. 20 14:01 diamond-150x150.jpg
    -rw-r----- 1 www-data www-data  12727 janv. 20 14:01 diamond-300x98.jpg
    -rw-r----- 1 www-data www-data  23517 janv. 20 14:01 diamond-500x163.jpg
    -rw-r----- 1 www-data www-data 245326 janv. 20 14:01 diamond.jpg

    and yet http://hwhacks.no-ip.org/wp-uploads/2013/01/diamond.jpg is not working.

    /etc/wordpress/htaccess is

    ##
    ## Configuration for a single blog hosted on / (root of the website)
    ##
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    ##
    ## Configuration for a multi-site wordpress installation using subdomains
    ##
    #<IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /
    #RewriteRule ^index\.php$ - [L]
    ## uploaded files
    #RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    ## real files dealt directly
    #RewriteCond %{REQUEST_FILENAME} -f [OR]
    #RewriteCond %{REQUEST_FILENAME} -d
    #RewriteRule ^ - [L]
    ## other go through index.php
    #RewriteRule . index.php [L]
    #</IfModule>

    Relevant portion of /etc/wordpress/config-hwhacks.no-ip.org.php

    $upload_path = "/srv/www/wp-uploads/";
    $upload_url_path = "http://hwhacks.no-ip.org/wp-uploads";

    Any idea ?

    Best Regards

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags