Sorry, I was too quick. Here's the fix: location ~ (.*/)file\.php { try_files $uri $1page.php?page=file; include fastcgi_params; fastcgi_pass ...; # path to fastcgi interface (unix socket or IP) }by locojohn - How to...
location ~ file\.php { try_files $uri page.php?page=file; } Andrejsby locojohn - How to...
Владислав, а почему бы их не забанивать на уровне ipchains? Зачем им вообще позволять доступ к сайту, если любой запрос, даже 403-ий всё равно на уровне http даёт нагрузку на сервер. Используйте fail2ban, например. Андрейby locojohn - Nginx Mailing List - Russian
Hello, First, what I noticed in your nginx.conf is that root directive does not specify the full document root path. I think the complete path must be specified. I would suggest moving "root" in to the server level, say just below server_name. Second, I think you don't have to repeat declaring root in each location. Usually, it should remain the same for the virtual host, just lby locojohn - Migration from Other Servers
I am not sure that it's nginx crash. If nginx would crash, you would not be able to get the 502 Bad Gateway response. This sounds more like the FastCGI backend has crashed, either PHP-FPM or PHP-CGI or anything else you've configured. In either case, it's better to resolve this issue by analyzing the logs and seeing why the backend crashes (if it's the backend), rather than restarting the serby locojohn - How to...
Hello, Since you asked so nicely: http://wiki.nginx.org/HttpAccessModule http://wiki.nginx.org/HttpCoreModule#error_page :-) Andrejsby locojohn - Migration from Other Servers
Hi, It shouldn't block access to folder itself. Perhaps, auto-indexing is disabled and you're trying to access /folder URL without explicitly specifying the document. Anyway, here the test configuration you posted works OK (nginx/1.1.4) As to why PHP files don't work work inside /folder -- no idea, post your entire nginx.conf so we could take a look. Andrejsby locojohn - How to...
Hello, Please attach your entire nginx.conf. Andrejsby locojohn - Migration from Other Servers
1. move the root directive outside the "location /" block into the server block 2. move "error_page 404 /errorpage.php" into the server block 2. alter fastcgi configuration as described below: # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; } 3. remove: "rewriteby locojohn - Migration from Other Servers
if ($args !~ ^(url|auto)) { rewrite ^(.*)$ http://$server_name/?url=$uri$is_args$args break; } Andrejsby locojohn - Nginx Mailing List - English
benek Wrote: ------------------------------------------------------- > Hello i would like to permanently > > rewrite > ^/asd/(.*)-(.*)/$http://something.yourwebsite.com/ > asd/$1-$2 permanent; > > And it doesnt work ! > > If i try to replace "-" with "/" > > rewrite > ^/asd/(.*)/(.*)/$http://something.yourwebsite.com/ >by locojohn - Migration from Other Servers
С Днём Рождения, Игорь! Пусть озарят и согреют тёплые лучи сентябрьского уходящего солнца твою душу! С поздравлениями из Риги, Андрейby locojohn - Nginx Mailing List - Russian
Unfortunately, PHP code in many known packages (such as Moodle) sometimes relies on the wrong assumption: $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; Because in Apache HTTPS variable is never submitted at all in http mode and coders believe this is enough information to check. So, is there a way to never submit HTTPS=off at all if HTTPS is not present?by locojohn - Nginx Mailing List - English
Alexander Bodnarashik, любопытные новости про linkinfo/realpath hack. Тем не менее, содержимого файлов прочитать нельзя этими функциями. Так что не понимаю, в чём состоит опасность вызова этих функций. Даже получив путь к файлам, их всё раby locojohn - Nginx Mailing List - Russian
Hi, Answers to your question may be beyond the scope of nginx configuration. For example, there are several sysctl options that control system limits that might affect what you are experiencing. Two of them you have already mentioned. You might want to look for more information about the below options. Try running the below commands from the same shell where you start nginx, then restartby locojohn - How to...
Peter Vereshagin Wrote: ------------------------------------------------------- > Рогатки вида open_basedir и safe_mode > дырявы. > Поясните, пожалуйста, что вы имеете ввиду про "дырявость" директивы open_basedir. Заранее благодарен, Андрейby locojohn - Nginx Mailing List - Russian
voodooKobra Wrote: ------------------------------------------------------- > Removing #default_type from the main .conf instead > forces it to serve it as a .txt file > > What can I do to get error pages to pass to > fastCGI? error_page 404 /your/error/page/script.php; error_page 403 http://$server_name/your/error/page/script.php; Andrejsby locojohn - How to...
Hi, Add "stub_status" to NGINX_MODULES_HTTP in /etc/make.conf: NGINX_MODULES_HTTP="access autoindex browser charset \ empty_gif fastcgi flv geoip gzip map proxy rewrite stub_status \ upstream_ip_hash upload_progress" Andrejsby locojohn - How to...
Hi, Search the manual for the following directives: http { [..] client_header_timeout 10m; client_body_timeout 10m; send_timeout 10m; fastcgi_read_timeout 600; fastcgi_send_timeout 600; } Then experiment and specify values that are appropriate for your server or virtual host. Andrejsby locojohn - Nginx Mailing List - English
try: location /global- { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /home/demo/html/all-tenders.php; fastcgi_pass phpfarm; # replace 'phpfarm' with your fastcgi host/socket } location ~ ^/.*-contracts.*\.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /home/demo/html/all-contracts.php; fastcgi_pass phpfarm; # replace 'phpfarm' with your fastby locojohn - Migration from Other Servers
kaa@berloga.ru Wrote: ------------------------------------------------------- > Через некоторое > > время (от секунды до > минуты и даже > ^^^^^^^^^^^^^^^^^^^^^ это > как-то коррелирует > > > open_file_cache_valid 60; > c вот этим > ^^^^^^^^^^^^^^^^^^^^^^^ Огроby locojohn - Nginx Mailing List - Russian
Сразу замечу, что скрипт glue.php в rewrite не имеет к таким javascript/css файлам никакого отношения, так как он в данном случае не используется. Речь идёт о подгружении статических файлов из html страниц, типа: [...] <link href="/resources/tesby locojohn - Nginx Mailing List - Russian
Привет! Проблема следующая, которая возникает периодически, без очевидной связи. Я обновляю статический CSS или JS файл по FTP. Делаю рефреш в браузере. Браузер "не видит" обновления, потому что сервер возвращает 304 Notby locojohn - Nginx Mailing List - Russian
Yes, this is perfectly possible. You should have nginx running as the front server and then proxy_pass all dynamic content to apache in the locations that you want, while serving all static files directly. Read the nginx manual for more information. There are also many similar examples on these forums. Andrejsby locojohn - How to...
rewrite ^\/sub-dir1\/sub-dir2\/file\sname\swith\sspaces\.htm$ http://mydomain.com/file-name/ permanent; Cheers, Andrejsby locojohn - How to...
if ($args ~ =\(\)\(\)\(\)) { return 403; } Andrejsby locojohn - How to...
Please post your nginx.conf here, because the error can be in the nginx configuration. Also make sure to have cgi.fix_pathinfo=1 in your php.ini. Andrejsby locojohn - Nginx Mailing List - English
the first "if" can be replaced with the following: location ^.+\.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root/vbseo.php; fastcgi_pass ....; # your fastcgi handler } not sure that the second "if" is needed, unless they meant to handle all non-existing files (404 errors) with vbseo.php. this can be done with the following: locby locojohn - Nginx Mailing List - English
You can also use PCRE capturing inside virtual host configuration, to capture both SCRIPT_FILENAME and PATH_INFO without URL encoding: location ~ ^(?<SCRIPT_FILENAME>.+\.php)$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$SCRIPT_FILENAME; fastcgi_pass ...; } location ~ ^(?<SCRIPT_FILENAME>.+\.php)by locojohn - Nginx Mailing List - English
Igor Sysoev Wrote: ------------------------------------------------------- > On Wed, Aug 31, 2011 at 09:23:59AM -0400, locojohn > wrote: > > Igor Sysoev Wrote: > > > Да, но какова цена этой > склейки. > Почему бы не склеить их в > статический файл для nginx'а, > да ещё и сделатby locojohn - Nginx Mailing List - Russian