Welcome! Log In Create A New Profile

Advanced

Re: MODx setup

Илья Шипицин
October 12, 2013 01:30PM
Уважаемые разработчики nginx, давайте сделаем раздел с примерами
конфигов для распространенных CMS (с разбором нюансов, почему именно
так), иначе тиражирование быдлоконфигов, когда .htaccess превращается
в кучу непонятно чего, никогда не закончится.

я мог бы сколько то времени уделить php-ным CMS-кам.

рабочий конфиг для MODx, только что проверил:


server {
listen 80;
server_name localhost;

root /srv/modx;

location / {
try_files $uri $uri/ @modx;
index index.php index.html index.htm;
}

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

location @modx {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
}


}

12 октября 2013 г., 17:37 пользователь Haikson <nginx-forum@nginx.us> написал:
> Нужна помощь в понимании как действовать. Пытаюсь установить MODx Revo
> Вот настройки nginx.
> server {
> listen 80;
> server_name xn----7sbitcnbnlgdqs1b8l.xn--p1ai;
> charset utf8;
> autoindex off;
> access_log /srv/logs/poly_access.log;
> error_log /srv/logs/poly_error.log error;
> root /srv/www/haikson/poly;
> index index.php;
> rewrite_log on;
>
> location /core/ {
> deny all;
> }
>
> location / {
> try_files $uri $uri/ @modx;
> }
>
> location @modx {
> rewrite ^/(.*)$ /index.php?q=$1;
> }
>
> location ~* "/\.ht" {
> deny all; # запретить все для всех
> return 404; # вернуть код ошибки 404
> }
>
> location = /favicon.ico {
> log_not_found off;
> access_log off;
> }
> location = /robots.txt {
> allow all;
> log_not_found off;
> access_log off;
> }
>
> location ~* \.(jpg|jpeg|gif|css|png|js|ico|bmp)$ {
> access_log off;
> expires 30d;
> break;
> }
>
> location ~ .php$ {
> try_files $fastcgi_script_name =404;
> fastcgi_split_path_info ^(.+\.php)(.*)$;
> fastcgi_pass
> unix:/var/run/php-fpm/phpfpm.socket;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> fastcgi_param PATH_TRANSLATED
> $document_root$fastcgi_script_name;
> fastcgi_param PATH_INFO $fastcgi_path_info;
> fastcgi_param PHP_VALUE "apc.cache_by_default=0";
> include fastcgi_params;
> }
> }
>
> Открываю /setup/ - всё нормально
> Пытаюсь перейти на сл. уровень (/setup/?action=welcome ) перебрасывает на
> /?action=welcome
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,243636,243636#msg-243636
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru

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

MODx setup

Haikson October 12, 2013 07:37AM

Re: MODx setup

kemko October 12, 2013 07:52AM

Re: MODx setup

Haikson October 12, 2013 08:41AM

Re: MODx setup

Илья Шипицин October 12, 2013 01:30PM

Re: MODx setup

Илья Шипицин October 12, 2013 01:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 161
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