Viewing 15 replies - 1 through 15 (of 15 total)
  • I’m having the same upload issues for matt.thiessen.us which is WPMU.

    Thread Starter gnappo

    (@gnappo)

    Hi Matt, i’m working on it i have tried to add this to .htaccess

    #uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    but nothing happen ;(

    i still searching…

    Thread Starter gnappo

    (@gnappo)

    i see that this could be right but nothing to do…

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    need help ??

    thx J.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    “AllowOverride not allowed ” is going to be a problem.

    Did you raise a ticket with MediaTemple about this?

    Thread Starter gnappo

    (@gnappo)

    yes i have open a ticket

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Two things.

    1) Make SURE the image is in https://blogtemplate.builtinsite.com/wp-content/uploads/sites/2/2013/08/

    2) You’re on nginx, so make sure you updated your nginx conf, and not the .htaccess. Nginx doesn’t use htaccess

    MediaTemple can help you sort that bit out ??

    Thread Starter gnappo

    (@gnappo)

    1) i confirm that image is on server in right directory, please Mika explain better MT use nginx?

    2) i have done many installation on MT of wp (not MU of course) and i have always config the htaccess because MT run on apache, is this different pm MU?

    is yes can you help me on which file i must configure?

    thx ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I can’t. I’m not super awesome with nginx, but now that you said you’re NOT on it, I think you’ve been hacked.

    https://blogtemplate.builtinsite.com/wp-content/uploads/sites/2/2013/08/psd-clipboard-icon.png

    Look at that page, it CLEARLY says nginx. I’ve seen that before on hacked sites where jquerye was inserted into the site :/ ask MT to scan your site fr hacks. Every host can do that.

    Thread Starter gnappo

    (@gnappo)

    Mika i meant that 4 me this is the first installation of WPMU on MTemple and i have read that since they use plesk 11 Nginx is enabled and i’m not so skilled in Nginx.

    Anyway i have open ticket to MT, meanwhile i have found this:

    https://rtcamp.com/wordpress-nginx/tutorials/multisite/subdomains/minimal/

    could be right…

    J.

    Thread Starter gnappo

    (@gnappo)

    from MT support

    “I would recommend updating your vhost.conf file with the correct path to your website. Please keep in mind that since your site is not under its own webspace, the website would not be inside ‘vhosts/mydomain.com’.

    Also once the update has been made, you would need to restart Apache in order for the changes to take effect.”

    i have no created a webspace of my domain in plesk 11 b4 install wp mu maybe is this?
    i have add domain inside the webspace of primary domain

    Could be this the issue?

    Thread Starter gnappo

    (@gnappo)

    i have tried to stop nginx service from plesk admin panel and now it works, according to me there is a conflict i don’t know which file i must set under nginx to configure vhost

    i see that i don0t have /etc/nginx/sites-available and /etc/nginx/sites-enabled directory on my centos os dv 4.0 server so i must reconfigure using this procedure?

    https://rtcamp.com/wordpress-nginx/tutorials/multisite/subdomains/minimal/

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I don’t know.

    I’m not trying to be cagey or anything, but I really honestly do not know. I’m not great with nginx, and I’ve never used MT so I can’t answer that ??

    Thread Starter gnappo

    (@gnappo)

    i have received MT answer but was not very clear, anyway, now disabling ngix work perfectly, so:

    i will perform a brand new installation of wp 3.6 creating a plesk webspaces not adding domain in primary domain webspaces.

    so if works, i will post the complete procedure 4 up and works wp on Mediatemple

    i suspect that Nginx on MT works as reverse proxy server working together apache and so we don’t need to reconfigure nginx.conf file.

    Thread Starter gnappo

    (@gnappo)

    ok guys i have done!!!

    works, now i will post the COMPLETE SOLUTION ??

    Thread Starter gnappo

    (@gnappo)

    ok this is my solution:

    yes i have fixed the problem, in short :

    1 ) create a custom template (nginx) on plesk by terminal (u can check in parallels plesk about how configure vhost with custom templates)
    2 ) add to your custom template the following lines at the beginning:

    <?php if (file_exists($VAR->domain->physicalHosting->vhostDir . ‘/conf/nginx.conf’)): ?>
    include <?php echo $VAR->domain->physicalHosting->vhostDir;?>/conf/nginx.conf;
    <?php endif ?>

    regenerate the configuration files with the command :

    Generate new configuration files:
    # httpdmng <command>
    Where <command> is one of the following:
    –reconfigure-server generates sever-wide configuration files.
    [B]–reconfigure-domain <domain-name> generates files for a specified domain.[/B]
    –reconfigure-all generates all configuration files.

    3) create nginx.conf file by terminal inside your var/www/vhosts/yourdomain/conf/ and add this configuration:

    map $http_host $blogid {
    default -999;
    include /var/www/vhosts/yourdomain/httpdocs/wp-content/uploads/nginx-helper/map.conf;
    }

    server {
    error_log /var/log/nginx/vhost-error_log warn;
    listen yourip:80;
    server_name yourdomain.com *.yourdomain.com;
    # access_log /usr/local/apache/domlogs/churchpr.es-bytes_log bytes_log;
    # access_log /usr/local/apache/domlogs/churchpr.es combined;
    root /var/www/vhosts/yourdomain/httpdocs;
    index index.php index.html index.htm;

    location / {
    location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
    expires 30d;
    try_files $uri $uri/ /index.php?$args;
    }

    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    error_page 405 = @backend;
    add_header X-Cache “HIT from Backend”;
    proxy_pass https://yourip:7081;
    include /var/www/vhosts/yourdomain/conf/proxy.conf;
    }
    location @backend {
    internal;
    proxy_pass https://yourip:7081;
    include /var/www/vhosts/yourdomain/conf/proxy.conf;
    }
    location ~ .*\.(php|jsp|cgi|pl|py)?$ {
    proxy_pass https://yourip:7081;
    include /var/www/vhosts/yourdomain/conf/proxy.conf;
    }
    location ~ /\.ht {
    deny all;
    }

    location ~ \.php$ {
    try_files $uri @wordpress;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass https://yourip:7081;
    }

    location ~ ^/files/(.*)$ {
    try_files /wp-content/uploads/sites/$blogid/ $uri/wp-includes/ms-files.php?file=$1;
    access_log off; log_not_found off; expires max;
    }

    location ^~ /sites {
    internal;
    alias /var/www/vhosts/yourdomain/httpdocs/wp-content/uploads/sites;
    access_log off; log_not_found off; expires max;
    }

    }

    4) create file proxy.conf

    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size 10m;
    client_body_buffer_size 128k;
    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;
    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;

    5) restart nginx and apache e voila

    IMPORTANT: check in vhost file your apache port in my mediatemple dv 4.0 i have 7081 but could be different in your configuration

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘multisite 3.6 broken link image 404 error’ is closed to new replies.