* [Comm] ALT-4.0 и nginx - Fast HTTP server
@ 2008-10-24 11:08 Vitalik Salomatin
2008-10-24 11:18 ` alisher
2008-10-24 11:22 ` Alexey Morsov
0 siblings, 2 replies; 3+ messages in thread
From: Vitalik Salomatin @ 2008-10-24 11:08 UTC (permalink / raw)
To: community
Установил из коробки nginx - Fast HTTP server
apt-get instal nginx
правлю, запускаю:
service httpd stop; service nginx restart; service httpd start
Пробую получать просто статические страницы
захожу: http://10.0.0.1/
отвечает: 403 Forbidden nginx/0.5.20
http://10.0.0.1:81 - напрямую апач отвечает.
Или nginx не проксирует на апач, либо апач не воспринимает nginx
в /etc/nginx/nginx.conf добавил только IP адрес - не работает.
Надо ли ставить еще какие пакеты?
Какие точно изменения надо сделать и что точно прописать в
конфиге?
в логах:
2008/10/24 15:40:51 [error] 2409#0: *2 directory index
of "/var/www/html/." is forbidden, client: 10.0.0.99, server:
chel.ru, URL: "/", host: "10.0.0.1"
Сам конфиг:
########################
worker_processes 10;
error_log /var/log/nginx/error.log;
events {
worker_connections 1024;
}
http {
proxy_temp_path /var/spool/nginx/tmp/proxy;
fastcgi_temp_path /var/spool/nginx/tmp/fastcgi;
client_body_temp_path /var/spool/nginx/tmp/client;
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
gzip on;
# text/html don't need to be defined there, it always
compressed
gzip_types text/plain text/css text/xml
application/x-javascript application/atom+xml;
# gzip_comp_level 9;
server {
listen 10.0.0.1:80;
server_name chelsi74.ru;
location / {
root /var/www/html/;
index index.html index.htm index.shtml;
# autoindex on;
# autoindex_exact_size on;
# autoindex_localtime on;
# expires on;
# cooperate with mod_realip in apache-1.3 or
mod_rpaf in apache-2.x
# proxy_redirect off;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For
$remote_addr;
# proxy_pass http://127.0.0.1/;
}
# charset on;
# source_charset koi8-r;
access_log /var/log/nginx/access.log;
}
}
######################
Спасибо.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] ALT-4.0 и nginx - Fast HTTP server
2008-10-24 11:08 [Comm] ALT-4.0 и nginx - Fast HTTP server Vitalik Salomatin
@ 2008-10-24 11:18 ` alisher
2008-10-24 11:22 ` Alexey Morsov
1 sibling, 0 replies; 3+ messages in thread
From: alisher @ 2008-10-24 11:18 UTC (permalink / raw)
To: Vitalik Salomatin, ALT Linux Community general discussions
Vitalik Salomatin пишет:
> Установил из коробки nginx - Fast HTTP server
> apt-get instal nginx
> правлю, запускаю:
> service httpd stop; service nginx restart; service httpd start
> Пробую получать просто статические страницы
> захожу: http://10.0.0.1/
> отвечает: 403 Forbidden nginx/0.5.20
>
http://server-tuning.info/nginx/about-nginx.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] ALT-4.0 и nginx - Fast HTTP server
2008-10-24 11:08 [Comm] ALT-4.0 и nginx - Fast HTTP server Vitalik Salomatin
2008-10-24 11:18 ` alisher
@ 2008-10-24 11:22 ` Alexey Morsov
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Morsov @ 2008-10-24 11:22 UTC (permalink / raw)
To: community
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]
On Fri, Oct 24, 2008 at 03:08:34PM +0400, Vitalik Salomatin wrote:
> http://10.0.0.1:81 - напрямую апач отвечает.
> Или nginx не проксирует на апач, либо апач не воспринимает nginx
> # proxy_redirect off;
> # proxy_set_header Host $host;
> # proxy_set_header X-Real-IP $remote_addr;
> # proxy_set_header X-Forwarded-For
> $remote_addr;
Раскомментировать.
Т.е. должно быть что-то вроде:
server {
listen *:80;
server_name my.domain.ru;
location / {
proxy_pass http://apache.my.int/;
proxy_set_header X-Real-IP $remote_addr;
}
}
--
WBR,
Alexey Morsov
программист ЗАО "ИК "Риком-Траст"
Jabber: samurai@www.fondmarket.ru
ALT Linux Team Member
> а как он [etcnet] мог от простого осизифливаничя автоматически поставиться?
apt-get, конечно, крут, но не настолько безжалостен.
-- ldv in community@
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-24 11:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-24 11:08 [Comm] ALT-4.0 и nginx - Fast HTTP server Vitalik Salomatin
2008-10-24 11:18 ` alisher
2008-10-24 11:22 ` Alexey Morsov
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git