#1  
Old 23rd April 2012, 13:25
cyprus cyprus is offline
Member
 
Join Date: Oct 2011
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wordpress Multisite get an 502

Hello last week I got ISPConfig to run after 2 weeks of hard work.
I resolved each task to get ISPcontig running on my server but the main point why I even thought about to switch my configuration is still not accomplished.

Before I start to describe the Problem here is my server config.
Debian Squeeze, Nginx , php-fpm, Postfix / Dovecot ,MySQL 5.5

Most stuff is fine ISPconfig seems to work like it should be. Postfix / Dovecot works as well.

I´ve uploaded a Flash Site to one of my webs and it works

I tried to move one of my Wordpress ms installation from an Apache environment, and this fails.
I know I can´t use the Apache .htaccess rules anymore and have to tell nginx what to do. I took the Nginx Config from the wordpress.org codex.
http://codex.wordpress.org/Nginx

The configuration is clear in most cases but there is one point which is not clear
Quote:
# Upstream to abstract backend connection(s) for PHP.
upstream php {
server unix:/tmp/php-fpm.sock;
# server 127.0.0.1:9000;
}
I implemented it as described but if I call a site I get an 502 Error.
Quote:
Folgender Fehler ist aufgetreten:

Dieser Server hat eine ungültige Antwort von einem Upstream-Server erhalten, auf den zugegriffen wurde, um die Anforderung zu erfüllen.
I get an invalid request from the Upstream Server.
And now I´m a littlebit lost. And need your inspiration to solve the problem.

Thank you in advance.
Cyprus
Reply With Quote
Sponsored Links
  #2  
Old 23rd April 2012, 13:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,900
Thanks: 693
Thanked 4,191 Times in 3,209 Posts
Default

The nginx configuration for php is done by ispconfig, so you should not duplicate this with your manual configuration or nginx will fail. The guide you followed is for a complete nginx configuration for servers without a controlpanel thats uses different paths etc., if you use a controlpanel like ispconfig, then dont touch nginx.conf file or site configuration file. Instaed you just add the wordpress rules in the custom nginx directives field in ispconfig.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 23rd April 2012, 14:07
cyprus cyprus is offline
Member
 
Join Date: Oct 2011
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Instaed you just add the wordpress rules in the custom nginx directives field in ispconfig.
I read about such field but where should this be?

Thank you for your reply
Reply With Quote
  #4  
Old 23rd April 2012, 14:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,900
Thanks: 693
Thanked 4,191 Times in 3,209 Posts
Default

Options tab of the website settings.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 23rd April 2012, 14:42
cyprus cyprus is offline
Member
 
Join Date: Oct 2011
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay thank you I found it.

But there are a few questions remaining.
1) Do you recommend to turn " Use Socket for PHP-FPM" on?
2) Do you agree that I only have to drop the rewrite rules for Nginx into the Nginx topic

Quote:
# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
try_files $uri $uri/ /index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

# Directives to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
}

# Pass uploaded files to wp-includes/ms-files.php.
rewrite /files/$ /index.php last;

# For multisite: Use a caching plugin that creates symlinks to the correct subdirectory structure to get some performance gains.
set $cachetest "$document_root/wp-content/cache/ms-filemap/${host}${uri}";
if ($uri ~ /$) {
set $cachetest "";
}
if (-f $cachetest) {
# Rewrites the URI and stops rewrite processing so it doesn't start over and attempt to pass it to the next rule.
rewrite ^ /wp-content/cache/ms-filemap/${host}${uri} break;
}

if ($uri !~ wp-content/plugins) {
rewrite /files/(.+)$ /wp-includes/ms-files.php?file=$1 last;
}

# Uncomment one of the lines below for the appropriate caching plugin (if used).
#include global/wordpress-ms-subdir-wp-super-cache.conf;
# include global/wordpress-ms-subdir-w3-total-cache.conf;

# Rewrite multisite '.../wp-.*' and '.../*.php'.
if (!-e $request_filename) {
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
rewrite ^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$ $1 last;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
}
Thanx in advance
Cyprus
Reply With Quote
  #6  
Old 23rd April 2012, 15:29
cyprus cyprus is offline
Member
 
Join Date: Oct 2011
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

So I deleted everything I´ve changed in the nginx.conf and orx.org vhost config and dropped the rewrite rule I posted above without the part for the caching plugin into nginx configuration in the ispconfig backend and the result is a 500 Error.
Not shure what to check next.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Updating and Uploading to Wordpress website on ISPConfig3 - Fedora 13 MrCompTech Tips/Tricks/Mods 5 4th May 2012 19:31
wordpress multisite a0011010011 Installation/Configuration 8 14th February 2012 22:44
ISPConfig 3.x - First Steps (Creating Web Sites, Email Addresses, Etc.) sighkick Suggest HOWTO 18 7th October 2010 00:12
ispconfig wordpress and directory/file permissions willebanks Installation/Configuration 4 9th March 2010 21:52
wordpress u Amorphous Installation/Configuration 2 10th July 2009 10:00


All times are GMT +2. The time now is 18:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.