Konuyu Oyla:
  • Toplam: 0 Oy - Ortalama: 0
  • 1
  • 2
  • 3
  • 4
  • 5
ehcp, nginx, wordpress
#1
thanks to: Brian Chabot:
I wasn't sure where this should go... Feel free to add it to the
documentation.

You can see it at work (for about the next day or so...) at
http://bctest.c4i.me/ (or till I break it...)
The test site is identical in most ways to http://indiebandwebsites.com/
but runs nginx.

----- Feel free to share the below parts - no attribution necessary
-----

Here's my work-around for getting permalinks to work right in nginx and
WordPress using EHCP:

1. Change apachetemplate.nginx to read:
-------------cut-----------
# this file used in Easy Hosting Control Panel (ehcp), www.ehcp.net
# webserver config file for nginx webserver
# This version is meant to work right with WordPress and the
# nginx compatibility plugin.

server {
listen 80;
server_name {domainname} www.{domainname};

access_log {homedir}/logs/access_log;
error_log {homedir}/logs/error_log;
access_log /var/log/apache_common_access_log;
error_page 404 = @wordpress;
log_not_found off;
root {homedir}/httpdocs;
index index.php index.html index.htm;

location ^~ /files/ {
rewrite /files/(.+) /wp-includes/ms-files.php?file=$1
last;
}

location @wordpress {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_NAME /index.php;
}

location ^~ /blogs.dir/ {
internal;
root /path/to/blog/wp-content;
}

location ~ \.php$ {
try_files $uri @wordpress;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
}

location ~ /\.ht {
deny all;
}

}
-------------cut-----------

2. Use the "nginx Compatibility" plugin for PHP5:
http://wordpress.org/extend/plugins/ngin...atibility/
- Install plugin but DO NOT activate it on install (that would activate
the PHP4 version.)
- Go into the plugins directory and activate the php5 version manually.

Done. You can now use permalinks other than the default.
Ara
Cevapla
Teşekkür verenler:


Hızlı Menü:


Şu anda bu konuyu okuyanlar: 1 Ziyaretçi


10tl.net Destek Forumu -