<div dir="ltr">аккуратнее с конфигами, чтобы демонов не вызвать :)<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-15 16:17 GMT+05:00 valmon <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Да, вы правы, локация не в том порядке, вот что получилось, но как<br>
выяснилось, по частям не вариант, получилось уже приличное количество<br>
исключений, для отдачи 403<br>
location ~* ^.+\.(xml|ini|bin|sql|log)$ {<br>
            deny    all;<br>
            return  403;<br>
        }<br>
server {<br>
    listen      <a href="http://192.168.0.147:443" rel="noreferrer" target="_blank">192.168.0.147:443</a>;<br>
    server_name <a href="http://site.com" rel="noreferrer" target="_blank">site.com</a>;<br>
    root        /home/admin/web/<a href="http://site.com/public_html" rel="noreferrer" target="_blank">site.com/<wbr>public_html</a>;<br>
    index       index.php index.html index.htm;<br>
    access_log  /var/log/nginx/domains/site.<wbr>com.log combined;<br>
    access_log  /var/log/nginx/domains/site.<wbr>com.bytes bytes;<br>
    error_log   /var/log/nginx/domains/site.<wbr>com.error.log error;<br>
<br>
    ssl         on;<br>
    ssl_certificate      /home/admin/conf/web/ssl.site.<wbr>com.pem;<br>
    ssl_certificate_key  /home/admin/conf/web/ssl.site.<wbr>com.key;<br>
<span class=""><br>
    location / {<br>
        root /home/admin/web/<a href="http://site.com/public_html" rel="noreferrer" target="_blank">site.com/<wbr>public_html</a>;<br>
            location ~ ^/[A-Z][A-Za-z]*. {<br>
                if (!-e $request_filename) {<br>
</span>                #rewrite ^/(.*)$ /core/Load.php?q=$1 last; Не работает<br>
Inclede с относительным путем<br>
                rewrite ^/(.*)$ /index2.php?q=$1 last;<br>
<span class="">                }<br>
            }<br>
        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|<wbr>ico|svg|css|js)$ {<br>
            expires     max;<br>
        }<br>
        location ~ [^/]\.php(/|$) {<br>
            fastcgi_param SCRIPT_FILENAME<br>
$document_root$fastcgi_script_<wbr>name;<br>
            if (!-f $document_root$fastcgi_script_<wbr>name) {<br>
                return  404;<br>
            }<br>
<br>
            fastcgi_pass    <a href="http://127.0.0.1:9000" rel="noreferrer" target="_blank">127.0.0.1:9000</a>;<br>
            fastcgi_index   index.php;<br>
            include         /etc/nginx/fastcgi_params;<br>
        }<br>
</span>        location ~* ^.+\.(xml|ini|bin|sql|log)$ {<br>
            deny    all;<br>
            return  403;<br>
        }<br>
    }<br>
<br>
    #error_page  403 /error/404.html;<br>
    #error_page  404 /error/404.html;<br>
    error_page  500 502 503 504 /error/50x.html;<br>
<br>
    location /error/ {<br>
        alias   /home/admin/web/<a href="http://site.com/document_errors/" rel="noreferrer" target="_blank">site.com/<wbr>document_errors/</a>;<br>
    }<br>
<br>
    location ~* "/\.(htaccess|htpasswd)$" {<br>
        deny    all;<br>
        return  404;<br>
    }<br>
<br>
    include     /etc/nginx/conf.d/phpmyadmin.<wbr>inc*;<br>
    include     /etc/nginx/conf.d/phppgadmin.<wbr>inc*;<br>
    include     /etc/nginx/conf.d/webmail.inc*<wbr>;<br>
<br>
    include     /home/admin/conf/web/snginx.<wbr>site.com.conf*;<br>
}<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?21,272923,272951#msg-272951" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?21,272923,272951#msg-<wbr>272951</a><br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx-ru</a></div></div></blockquote></div><br></div>