Forum Replies Created

Viewing 13 replies - 31 through 43 (of 43 total)
  • 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 http://yourip:7081;
    include /var/www/vhosts/yourdomain/conf/proxy.conf;
    }
    location @backend {
    internal;
    proxy_pass http://yourip:7081;
    include /var/www/vhosts/yourdomain/conf/proxy.conf;
    }
    location ~ .*\.(php|jsp|cgi|pl|py)?$ {
    proxy_pass http://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 http://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

    Thread Starter gnappo

    (@gnappo)

    ok guys i have done!!!

    works, now i will post the COMPLETE SOLUTION πŸ˜€

    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)

    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?

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

    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)

    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:

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

    could be right…

    J.

    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 πŸ™‚

    Thread Starter gnappo

    (@gnappo)

    yes i have open a ticket

    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.

    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)

    ok Jeff, i have solved πŸ˜€

    Thread Starter gnappo

    (@gnappo)

    Hi i have tried without ajax enabled and it works, please let me know if you can fix, cause ajax effect is much much better

    thx

    Thread Starter gnappo

    (@gnappo)

    Now i have tried to add also the custom link profile to a role members, same issue, seems that all the directory under wp-admin give this error, please can you help me?

Viewing 13 replies - 31 through 43 (of 43 total)