images in mappped domains (43 posts)

  1. calisun
    Posted 3 years ago #

    Primary domain works fine, images upload fine and they show up in posts.
    On mapped domains, the images upload and I can see them in the media library, but they don't show up in the post, not even the broken image icon, nothing. Only way I can see anything where the image is supposed to be is when I write an image caption, and that shows up, otherwise nothing.

  2. Do they show up in the view-source?

    Have you tried a different theme?

    Did they work BEFORE you mapped domains?

    Are you using any hotlink protection and, if so, did you remember to allow your mapped domains?

  3. calisun
    Posted 3 years ago #

    Ipstenu, thank you for your reply:

    Do they show up in the view-source?

    Yes, when I edit the post, I can see the picture, but it does not show up when I update and view the page.

    Have you tried a different theme?

    Yes, I use Coraline theme, so I have tried changing to TwentyTen and TwentyEleven, and same result, no image.

    Did they work BEFORE you mapped domains?

    Not sure, I have installed mapping plugin on a new wordpress install.
    I have been spending my time getting my primary domain looking the way I want, so all uploads show up fine in the primary domain.
    I have been putting posts on my mapped domains and I did upload new header in the mapped domain, and that all works fine. This is the first time I have tried adding an image into a post, so I am not sure if the problem has always been there or if my recent update to 3.3.2 has changed anything.

    Are you using any hotlink protection?

    No hotlink protection as of right now.

  4. Okay, you should always, always, always, test that Multisite works before you map it.

    Can you link to a site having this problem?

  5. calisun
    Posted 3 years ago #

    You are right, I did test on the primary domain, but I did not think of testing subdirectory before mapping them.

    The domain in question is: (You can see image caption "Hiring Manager Reading resume" but no image)

  6. calisun
    Posted 3 years ago #

    here is contents of my .htaccess

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
  7. That looks good, so odds are it's your httpd.conf file. Can you check if it has allowoverride set to ALL?

  8. calisun
    Posted 3 years ago #

    yes, it is: AllowOverride all

    Now I have found something strange, to test it, I have created another site under the same primary domain, but I did not map it, so it is

    I went into the newly created site and I have uploaded an image into a "Hello world!" post. After updating and logging out from admin panel and after going to:
    I can see the image inside the post.
    To further test, I have uploaded image into "Sample Page" and it also shows up.

    So it looks like it is an issue with domain mapping.
    Where should I go from here to fix the issue?

  9. Maybe not domain mapping...

    Can you switch themes? Or test THAT theme on a the test site?

  10. calisun
    Posted 3 years ago #

    Further testing,
    my unmapped site used TwentyEleven theme, so I switched the theme to Coraline (Same theme as domain with problems) and previously uploaded images showed up fine. Just to make sure, I have uploaded additional image, and it showed up fine.

    Then I mapped this site to a domain, once I went to the newly mapped domain_com, the post shows, but just like before, images Don't show up.

    Then to further test, I un-mapped the site, and once I went to
    the primary-domain/site/ the images showed up fine again.

    FYI, I use the same Custom Permalink Settings for both mapped and un-mapped site:

  11. Given that I know, personally, mapped domains don't cause this issue, I'm going to GUESS you have some hotlink protection going on :/

  12. calisun
    Posted 3 years ago #

    I don't have any hotlink protection installed.
    Just to make sure, I have deactivated ALL plugins (Except for WordPress MU Domain Mapping) and still, no images in mapped domain post.

  13. I am 100% sure it's not the plugin.

    It's GOT to be the server setup. Somewhere in there it doesn't think it's allowed to show images...

    yes, it is: AllowOverride all

    Wait, for ALL the domains?

  14. calisun
    Posted 3 years ago #

    On my server you enable/disable settings per directory and all domains pointing to that directory follow permissions of that directory.
    The directory that my wordpress is installed in, it has:
    AllowOverride all
    FollowSymLinks enabled

  15. Well the issue is in your server setup. Since the image works when we remove ms-files.php from the equation (i.e. http://employment-office.net/wp-content/blogs.dir/4/files/2012/05/Hiring-Manager-Reading-resume_2-270x300.jpg works fine) then the most common issue is that httpd.conf.

    What server setup are you on?

  16. calisun
    Posted 3 years ago #

    I use SME Server from http://www.contribs.org
    It is a different system from your standard linux, it uses templates for system configuration.
    Since it is not a common setup, I have created installation instructions for WordPress on SME Server and I have shared it with SME Server community.
    (If you are interested, my how-to can be found here)


  17. A quick search and it looks like we've got SME/Multisite issues with that going back over a year.

    Also found your post: http://forums.contribs.org/index.php?topic=47664.0 :D

    How does it know to apply the allowoverride to the mapped domains? I know when I go look at my httpd.conf, it has vhost sections for each domain (or combined sections for ipstenu.org and halfelf.org, which are mapped to the same place). Logically that's somewhere in there...

  18. Curtiss Grymala
    Posted 3 years ago #

    The problem is that something is removing "wp-content" from the URL of the images. In the page source, it's pointing to http://employment-office.net/files/2012/05/Hiring-Manager-Reading-resume_2-270x300.jpg but should be pointing to http://employment-office.net/wp-content/files/2012/05/Hiring-Manager-Reading-resume_2-270x300.jpg (which works).

  19. Curtis, that's how Multsite works. It's okay.


    See? Works fine.

    http://halfelf.org/files/2012/05/devo-cover-100x100.jpg is a mapped domain :)

  20. Curtiss Grymala
    Posted 3 years ago #

    Hey, you're right. For some reason, I could have sworn you still needed the wp-content portion in the URL, but I just checked my sites and they don't have wp-content in the image URLs.

    However, as I mentioned, the image mentioned above does work with wp-content in the URL (so, the "files" portion of the URL is rewriting to blogs.dir properly, but the wp-content is not getting added into the rewrite).

  21. @calisun, I've just looked over SME and it looks like these commands

    db accounts setprop "iBay" AllowOverride all
    db accounts setprop "iBay" FollowSymLinks enabled
    db accounts setprop "iBay" Indexes disabled
    signal-event ibay-modify "iBay"

    get parsed out to your actual Apache configuration files. Can you locate (not change anything) and upload that file or files to pastebin.com? Feel free to sanitize them.

    What appears to be happening is that the AllowOverride isn't being applied to the VirtualHost.

    On my default and vhost configs I have an explicit statement in both locations.

    <Directory />
       Options FollowSymLinks -Indexes
       AllowOverride All

    I just want to confirm that your SME generated config file have that too.

    Edit: Also can you copy the portions for apache2handler from <?php phpinfo() ?> output? I want to see what modules are loaded.

  22. calisun
    Posted 3 years ago #

    Not sure if this is enough to answer your question, but inside httpd.conf, I see this:

        ServerName employment-office.net
    RewriteEngine on
        RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
        RewriteRule .* - [F]

    Also, inside httpd.conf, I see this in regards to the directory where the wordpress is installed:

    # ibay directories
    <Directory /home/e-smith/files/ibays/wordpress/html>
        Options None
        Options +FollowSymLinks
        Options +Includes
        AllowOverride all
        order deny,allow
        deny from all
        allow from all

    To answer the PHP modules question:

    Loaded Modules
    core prefork http_core mod_so mod_env mod_log_config mod_mime mod_negotiation mod_status mod_info mod_include mod_autoindex mod_dir mod_cgi mod_asis mod_imagemap mod_actions mod_proxy mod_proxy_http mod_alias mod_rewrite mod_authz_host mod_authz_user mod_auth_digest mod_expires mod_headers mod_usertrack mod_setenvif mod_auth_external mod_php5 mod_ssl
  23. That's good, but see that <Directory /home/e-smith/files/ibays/wordpress/html> part? Is that entirely enclosed within the <VirtualHost> section?

    I'm not sure about SME, but on my Ubuntu LTS setup my default website is separate from my VirtualHost sections. I have the AllowOverride statement in both locations.

  24. Is there a separate virtual host section for the non-mapped domain as well? In mine, I combined them so it's got ipstenu.org, http://www.ipstenu.org, halfelf.org etc etc all in a row. Only have to add stuff once (which was a matter of lazy DNSing via WHM and cPanel).

  25. calisun
    Posted 3 years ago #

    Is there a separate virtual host section for the non-mapped domain as well?

    SME Server can only have one Default domain, all other domains added to the server after initial setup, are all virtual domains.
    In SME server there is no way to distinguish if the domain is wordpress primary or if it is wordpress mapped domain.
    In SME you just setup a domain and tell it to which iBay to point it to.

    <Directory /home/e-smith/files/ibays/wordpress/html> part? Is that entirely enclosed within the <VirtualHost> section?

    No, it is all separate,
    it is something like this:

        ServerName domain#1
        ServerName domain#2
        ServerName domain#3
    etc.. etc.. etc...

    than afterwards there is separate section:

    # ibay directories
    <Directory /home/e-smith/files/ibays/iBayName#1/html>
    <Directory /home/e-smith/files/ibays/iBayName#2/html>
    <Directory /home/e-smith/files/ibays/iBayName#3/html>
  26. Separate? Huh.

    I've never even considered trying that, my Directory statements are always wrapped in my VirtualHost sections. I can't remember if that's done simply for organizational/readability purposes or if it won't work that way. I'm pretty sure they have to be inside the VirtualHost sections or Apache doesn't know to apply the override correctly to the right vhost.

    Can you get SME to move those Directory statements moved into the VirtualHost section?

  27. calisun
    Posted 3 years ago #

    I have posted in SME Server forum to see if anybody has any answers there.

  28. calisun
    Posted 3 years ago #

    Strangest thing, I did some changes to the server and eventually I got the images to show, but only sometimes. For a while I could not figure out why it showed up only sometimes, but eventually it turns out that:
    when I connect to my site:
    no images
    but when I connect:
    I see images

    Still trying to figure out what is going on.

  29. calisun
    Posted 3 years ago #

    I can't find anybody that would know the answer.

    Does anybody here know why images would show up when viewing page using https:// but no images when viewing using http://

    Please check on my link mentioned above and let me know if you get the same results, images using https:// but no images when using http://

    any suggestions greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.