2013-03-22 13 views
6

Przeprowadzam migrację z apache2 do nginx. Nie mogę wymyślić, jak przepisać te przepisać dla wordpress.Od apache do nginx: wordpress przepis przeprojektowania

Jest to rzeczywiście mój plik konfiguracyjny

server { 
     listen 80;  
     root /usr/share/nginx/blog.com/public_html; 
     index index.html index.htm index.php; 

     server_name blog.com www.blog.com; 

     location/{ 
       try_files $uri $uri/ /index.html; 

     } 

     location /doc/ { 
       alias /usr/share/doc/; 
       autoindex on; 
       allow 127.0.0.1; 
       allow ::1; 
       deny all; 
     } 

     location ~ .php$ { 
       fastcgi_pass 127.0.0.1:9000; 

       fastcgi_param SCRIPT_FILENAME /usr/share/nginx/blog.com/public_html$fastcgi_script_name; 
       fastcgi_index index.php; 
       include fastcgi_params; 
     } 

} 

używam php5-fpm.

i to jest zasada Chciałbym dodać:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /blog/ 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /blog/index.php [L] 
</IfModule> 

# END WordPress 

Czy możesz mi pomóc? Dzięki :)

Odpowiedz

Powiązane problemy