C
C
Counter2015-08-19 14:10:59
Nginx
Counter, 2015-08-19 14:10:59

Installing textolite on NGINX + FPM. Has anyone set it?

The developer's website says:

To run the system under Nginx without Apache, you need to configure the server according to the parameters from the .htaccess file. The .htaccess file can be deleted in this case. For a standard installation, you can use the following code:
index textolite.php;
if (!-e $request_filename) {rewrite ^/textolite/(.*)$ /textolite/textolite.php?query=$1}
location ~ \.(ini|log)$ {deny all;}

There was no .htaccess in the archive, so I just added the presented code to the domain config. But after entering the password, the page simply reloads and asks to enter the password again.
My ngixn config:
server {
    listen  80;
    server_name mydomain.ru www.mydomain.ru;
    charset utf-8;
    access_log  /var/log/nginx/mydomain.ru_access.log combined;
    error_log   /var/log/nginx/mydomain.ru_error.log;
    root /var/www/mydomain;

    gzip on;
    gzip_disable "msie6";
    gzip_comp_level 6;
    gzip_min_length  1100;
    gzip_buffers 16 8k;
    gzip_proxied any;
    gzip_types text/plain application/xml
      application/javascript
      text/css
      text/js
      text/xml
      application/x-javascript
      text/javascript
      application/json
      application/xml+rss;

    client_max_body_size            100m;
    client_body_buffer_size         128k;
    client_header_timeout           3m;
    client_body_timeout             3m;
    send_timeout                    3m;
    client_header_buffer_size       1k;
    large_client_header_buffers     4 16k;

    #   Точка входа
    location / {
        root /var/www/mydomain;
        index index.html index.php index.htm textolite.php;
        if (!-e $request_filename) {
        rewrite ^/textolite/(.*)$ /textolite/textolite.php?query=$1;
         }

        try_files $uri $uri/ @fallback;
    }

    
    location ~ \.php$ {
        root /var/www/mydomain;
        proxy_read_timeout 61;
        fastcgi_read_timeout 61;
        try_files $uri $uri/ =404;
        #   Путь до сокета демона PHP-FPM
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ \.(ini|log)$ {
        deny all;
    }
    
    location ~ /\.ht {
        deny  all;
    }

}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Counter, 2015-08-19
@Counter

I asked myself, I will answer.
The problem was with permissions. nginx could not create files and make changes to existing ones. And for Textolite, this is a prerequisite. Corrected the rights and everything flew.

D
DmitriyKorobka, 2016-01-12
@DmitriyKorobka

You need to put write permissions on the conf.ini file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question