[lang_en]
Sometimes you may need to implement controlled downloads when all downloads requests being sent to your script and then this script decides what to do: to send some file to the user or to show some access denied page or, maybe, do something else. In lighttpd server it can be done by returning X-Sendfile header from script. Nginx have its own implementation of such idea using X-Accel-Redirect header. In this short post I will try to describe how to use this feature from PHP and Rails applications.
[/lang_en]
[lang_ru]
Иногда вам может быть нужно реализовать т.н. контролируемое скачивание, когда все запросы на скачивание файлов передаются скрипту, который решает, как поступить: отправить пользователю какой-либо файл, или показать стриницу access denied, или, может быть, сделать что-то еще. При использовании сервера lighttpd это может быть реализовано при помощи заголовка X-Sendfile, возвращаемого из скрипта. Nginx имеет свою союственную реализацию описанной идеи с использованием заголовка X-Accel-Redirect. В этой короткой статье я попытаюсь описать, как использовать эту возможность из приложений на PHP или Rails.
[/lang_ru]
Read the rest of this entry →
[lang_en]
I was looking forward for this feature for last 3 months! And at last, it is there! Now, nginx works on our streaming servers perfectly and flv streaming will not be Lighttpd’s unique feature anymore. 🙂 This post is about how to use new Nginx module http_flv_module introduced in 0.4.7 (but there was a bug in its implementation, that can be fixed with my patch) and made completely perfect in 0.4.8.
[/lang_en]
[lang_ru]
Я ждал этой возможности в Nginx на протяжении последних 3 месяцев! И вот, наконец-то, она реализована! Теперь, nginx прекрасно работает на наших стриминг серверах, а возможность стриминга flv-файлов больше не является уникальной фичей Lighttpd. 🙂 Этот пост расскажет вам о том, как использовать новый модуль Nginx под названием http_flv_module, впервые реализованный в версии 0.4.7 (но там была досадная ошибка в реализации стриминга, которая исправляется моим патчем) и доведенный до идеала в 0.4.8.
[/lang_ru]
Read the rest of this entry →
[lang_en]
It will be really short post about using set of free tools to implement fully functional flash video streaming server. So, what we are going to get at the end of our setup? We are going to get some type of completely free streaming support that is available with Macromedia’s non-free Flash Communication Server (Flash Media Server) (FCS). 🙂
[/lang_en]
[lang_ru]
Это очень короткий пост о том, как при помощи набора бесплатных инструсментов реализовать полнофункциональный потоковый видео сервер, основанный на flash video. Итак, что же мы хотим получить после окончания настройки сервера? Все очень просто – мы хотим получить бесплатный функциональный аналог решения по стримингу видео, реализованного в Flash Communication Server (Flash Media Server) компании Macromedia. 🙂
[/lang_ru]
Read the rest of this entry →
[lang_en]
Sometimes we may need to know geocode of some specific postal location. For example, you have some shops catalogue and want to show shop locations on the map. Then, you will need to ask some service about map marker coordinates. If geocode service is not available or it can’t parse provided address, you will not be able to show map to your users. 🙁 To solve such problem I’ve created small PHP-module, that helps me to get reliable results from set of miscellaneous geocoding services.
As for now, module can use Google Maps API, Yahoo Maps Services, Geocoder.us and Geocoder.ca services, but it is easily extensible and I can almost any services there. So, if you know some other services, that providing longitude/latitude pair by postal address, drop me a note and I will try to add its support to library.
[/lang_en]
[lang_ru]
Иногда нам бывает необходимо узнать геокод (geocode), соответствующий определенному почтовому адресу. Например, у Вас может быть каталог магазинов и вы хотите показывать расположение конкретных магазинов на карте. Стандартным решением является запрос к каким-либо geocoding-сервисам, которые выдадут вам широту и долготу указанного вами адреса для изображения маркеров на карте. Но, если geocode-сервис не доступен или не сможет разобрать предоставленный ему адрес, то вы не сможете показать пользователям карту. 🙁 Для решения данной проблемы я написал небольшой модуль на PHP, который помогает мне получать надежные результаты в большинстве случаев просто используя несколько различных geocoding-сервисов.
На данный момент модуль умеет использовать Google Maps API, Yahoo Maps Services, Geocoder.us и Geocoder.ca, но он легко расширяем и потому я могу добавить туда практически любой другой источник данных. Поэтому, если вы знаете какие-либо сервисы, способные предоставить широту и долготу по указанному почтовому адресу, сообщите мне и я буду раз добавить поддержку этого сервиса в библиотеку.
[/lang_ru]
- Posted in: Uncategorized
- Tags: Nginx
30 Aug2006
If you will try to compile nginx in Redhat Linux, you can get following error even if you have pcre-devel package installed:
1 2 3 4 5 6 7 8 9 10
| Configuration summary
+ threads are not used
+ PCRE library is not found
....
....
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
</path> |
If you are experiencing this small problem, you should simply use following parameter of configure script:
1
| # ./configure --with-cc-opt="-I /usr/include/pcre" |
And voila!
1
| + using system PCRE library |
Now it can see and will use system PCRE library.