Welcome! Log In Create A New Profile

Advanced

Re: Nginx rewrite for Maxsite CMS

February 03, 2011 03:30AM
On Thu, Feb 03, 2011 at 03:14:30AM -0500, xopek wrote:

> Может я и туплю, но для меня совсем
> непонятна даже документация на офсайте
> по вот этим правилам и\или реврайтам.
> Сделал как указано - не сработало.
> Имеется сейчас вот такой вид:
> [code]
> server {
> listen ip:port;
> server_name site.ru www.site.ru;
> root /path/to/site;
>
> location / {
>
> index index.php index.html index.htm;
> try_files $uri/ @maxsite;
> }
>
> location ^~ /uploads/ {
> }
>
> location = /robots.txt {
> }
>
> location = /favicon.ico {
> }
>
> location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico)$ {
> root /path/to/site;
> }
>
> location ~ \.php$ {
> fastcgi_pass unix:/tmp/php-fpm.sock;
> include fastcgi_params;
> fastcgi_param SCRIPT_FILENAME
> /path/to/site$fastcgi_script_name;
> }
>
> location @maxsite {
> fastcgi_pass unix:/tmp/php-fpm.sock;
> include fastcgi_params;
> fastcgi_param SCRIPT_FILENAME /path/to/site/index.php;
> fastcgi_param QUERY_STRING $uri;
> }
> }
> [/code]
> Отличие от указанного выше невелики, но
> с ними я имею рабочие страницы по типу
> site.ru/pagename (до этого 404 на все кроме
> главной). Однако осталось мелочь.
> site.ru/page/pagename - выдается ошибка самой MaxSite
> 404 и при этом не видятся ни css таблицы, ни
> картинки.
> Было
> [code]
> try_files $uri $uri/ @maxsite;
> ############################
> location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico)$ {
> }
> ############################
> fastcgi_param QUERY_STRING q=$uri;
> [/code]
> Стало:
> [code]
> try_files $uri/ @maxsite;
> ############################
> location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico)$ {
> root /path/to/site;
> }
> ############################
> fastcgi_param QUERY_STRING $uri;
> [/code]
> Подскажите как поправить дальше. Можно
> сделать просто чтобы из урл
> http://site.ru/page/pagename убиралось /page и
> становилось http://site.ru/pagename

Русских языка не совсем понятно.


--
Игорь Сысоев
http://sysoev.ru

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Nginx rewrite for Maxsite CMS

Dmitriy_K August 31, 2010 02:28PM

Re: Nginx rewrite for Maxsite CMS

Dmitriy_K September 01, 2010 05:52AM

Re: Nginx rewrite for Maxsite CMS

Dmitriy_K September 01, 2010 10:16AM

Re: Nginx rewrite for Maxsite CMS

Igor Sysoev September 01, 2010 06:04AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 03:14AM

Re: Nginx rewrite for Maxsite CMS

Igor Sysoev February 03, 2011 03:30AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 03:41AM

Re: Nginx rewrite for Maxsite CMS

Aleksandr Sytar February 03, 2011 04:00AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 04:37AM

Re: Nginx rewrite for Maxsite CMS

Igor Sysoev February 03, 2011 05:14AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 05:43AM

Re: Nginx rewrite for Maxsite CMS

Vovas August 23, 2011 08:28AM

Re: Nginx rewrite for Maxsite CMS

Igor Sysoev February 03, 2011 05:52AM

Re: Nginx rewrite for Maxsite CMS

Slava Kokorin February 03, 2011 06:20AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 06:51AM

Re: Nginx rewrite for Maxsite CMS

NiTr0 April 01, 2011 10:59AM

Re: Nginx rewrite for Maxsite CMS

Dmitriy_K September 03, 2010 01:34PM

Re: Nginx rewrite for Maxsite CMS

kolobok01 September 13, 2010 09:45PM

RE: Nginx rewrite for Maxsite CMS

maxhl September 15, 2010 07:42AM

Re: Nginx rewrite for Maxsite CMS

Vitaliy Lisenko September 15, 2010 01:36PM

Re: RE: Nginx rewrite for Maxsite CMS

kolobok01 September 16, 2010 09:14PM

Re: RE: Nginx rewrite for Maxsite CMS

kolobok01 September 17, 2010 02:11AM

Re: Nginx rewrite for Maxsite CMS

Vladislav V. Prodan September 17, 2010 01:44AM

Re: RE: Nginx rewrite for Maxsite CMS

Sergey Averyanov September 17, 2010 04:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready