Posts tagged “FreeBSD” 
-
Computer
-
FreeBSD
Решил для разнообразия написать компьютерный пост на русском – благо это просто краткая заметка для моей памяти.
Для связывания URL и локального пути в ядре nginx есть две директивы: root и alias. Обычно используется первая – например, в такой форме:
Здесь запрос любого файла с расширением htm, html, jpeg и т.д. будет связан с локальным путём /usr/home/mysite.ru/pub – анпример, http://mysite.ru/path/file.rar адресуется к /usr/home/mysite.ru/pub/path/file.rar. Как видно, nginx включает в локальный путь путь из URL (/path/).
Однако иногда нужно больше гибкости – часто нужно исключить путь к файлу в URL из локального пути, либо если используются регулярные выражения – вставить их совпадения в путь ($1 и т.д.). Это делается директивой alias:
В этом примере мы перенаправляем запрос вида http://mysite.ru/bundles/mybundle/resource.css в /usr/local/www/somewhere/bundles/MYBUNDLE/public/RESOURCE.CSS – как видим, новое расположение может быть вне любого «document root» (такого понятия в nginx по сути нет), а также может использовать $N из выражения родительского **(http://nginx.org/ru/docs/http/ngx_http_core_module.html#location location))**ю
|
Show this entry
»
-
Computer
-
FreeBSD
Today I got finally tired of constant server hangs because of Apache's httpd process' segfaults (signal 15) every one-two days and decided to rebuild all ports I have installed because, as I know, segfauls happen when binaries/shared libraries were built on a different system than on the one they're ran at. Or if they were linked to old library versions before an upgrade, for instance.
So I did this with shportupgrade -rRfbuv apache option which took the server roughly 8 hours to complete. However, after that I got zillion of Cyrus messages in my error log saying things like:
These lines quickly filled the logs resulting in 690 Megabytes (!). I didn't have a clue for some time and restarting Cyrus, Postfix or the entire server yielded no visible changes. Then I looked further into the log file – somewhere in the middle there turned out to be several lines like this:
I tried to execute the listed command from under the cyrus user and got this message:
«…»
|
Read rest of this entry
»
-
Computer
-
FreeBSD
Time synchronization is performed by ntpdate program that uses
NTP. You can manually synchronize your compuetr's clock by:
If you want to always keep your clock up to date you can use cron – just add the
following line to your root's crontab:
It will update time each hour at its 01 minute.
Quick tip on editing cron tables
«…»
|
Read rest of this entry
»
-
Computer
-
FreeBSD
A follow-up article on my guide for setting up Postfix + Cyrus mail server. Today we're preparing SMTP auth - not so easy as it seems!
This is part 2 of my tutorial on setting up your own e-mail host.
While stalking the Internet I have stumbled upon this handy script
that will collect info about your SASL installation and SMTP auth configuration and
display it – I almost haven't used it but it looked pretty nice so I thought I'd share
it with you.
Note that it needs bash to run (on my FreeBSD 8 it wasn't installed bydefault, you can get it from /usr/ports/shells/bash/.
Intro – why use SMTP auth?
First of all let's remember a strange-sounding config option of Postfix' main.cf file
which we saw yesterday when setting it up: it's mynetworks_style. Until today I didn't
realy realize what it was for and why have «trusted» and «strangers» when receiving incoming
mail. I didn't care and set it to subnet (as it was by default) and everything worked fine.
«…»
|
Read rest of this entry
»
-
Computer
-
FreeBSD
The complete guide to setup your own e-mail host on FreeBSD 8 using Postfix & Cyrus.
There's a second part of this tutorial talking about SMTP authorization of Postfix.
Intro
Getting up my own e-mail host was always fascinating me. Several days ago I finally
decided to give it a try.
I have a server in my house that's hang up near the ceiling in the kitchen. It runs FreeBSD
and some sites of mine served by Apache & nginx. I decided to set up a mail system there
so I can have a neat address like sοmewhο@i-forge.net.
«…»
|
Read rest of this entry
»
Недавние комментарии
«Stage Once» – a Visual Novel hacking tutorial
Part 1 – the Bruteforce
Today's vectors
Encoding choices as a secure string
Рога и копыта