LINUX.ORG.RU

Сообщения xanderlexx

 

Не работает почта?

Форум — Admin

Доброго времени суток уважаемые форумчане! Столкнулся с «проблемой» в виде связки Postfix+Dovecot+..., т.е. почта не отправляется и не принимается :(. НО - если воспользоваться утилитой mail из консоли, типа: mail -c «Hello World» user@example.com накатать какой-нить текст и отправить.... то письмо отправляется, и причем нормально. т.е. письмо попадает именно туда, куда нужно... Дабы не быть голословным, привожу конфиги для Postfix и Dovecot: main.cf

command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
myhostname = ns1.example.com
mydomain = example.com
myorigin = $mydomain
# Enable IPv4, and IPv6 if supported
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain
unknown_local_recipient_reject_code = 550
mynetworks = 10.0.0.0/28, 127.0.0.0/8
mynetworks = $config_directory/mynetworks
mynetworks = hash:/etc/postfix/network_table
alias_maps = hash:/etc/aliases
home_mailbox = Maildir/
mail_spool_directory = /var/spool/mail
debugger_command =
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	 ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
###
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
###
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
always_bcc = postfix@examplehosting.com
myhostname = ns1.example.com
ipc_idle = 100s
recipient_delimiter = +
relay_domains = $mydestination, lists.perlportal.com
queue_run_delay = 1000s
minimal_backoff_time = 1000s
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
sender_canonical_maps = hash:/etc/postfix/canonical
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
inet_interfaces = all
smtpd_sasl_security_options = noanonymous
mydestination = $myhostname, localhost.$mydomain, localhost, ns1.example.com
master.cf

# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp	inet	n	-	n	-	-	smtpd -o smtpd_sasl_auth_enable=yes
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
	-o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop  unix  -       n       n       -       -       pipe
#  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail    unix  -       n       n       -       -       pipe
#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp     unix  -       n       n       -       -       pipe
#  flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
submission	inet	n	-	n	-	-	smtpd -o smtpd_sasl_auth_enable=yes
Dovecot.conf
## Dovecot configuration file

# If you're in a hurry, see http://wiki.dovecot.org/QuickConfiguration

# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.

# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, put the
# value inside quotes, eg.: key = "# char and trailing whitespace  "

# Default values are shown for each setting, it's not required to uncomment
# those. These are exceptions to this though: No sections (e.g. namespace {})
# or plugin settings are added by default, they're listed only as examples.
# Paths are also just examples with the real defaults being based on configure
# options. The paths listed here are for configure --prefix=/usr
# --sysconfdir=/etc --localstatedir=/var

# Protocols we want to be serving.
#protocols = imap pop3 lmtp
#protocols = imap pop3
protocols = imap pop3
mail_location = maildir:~/Maildir
pop3_uidl_format = %08Xu%08Xv
# Required on x86_64 kernels
#login_process_size = 64
# A comma separated list of IPs or hosts where to listen in for connections. 
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
#listen = *, ::
listen = *

# Base directory where to store runtime data.
#base_dir = /var/run/dovecot/

# Greeting message for clients.
#login_greeting = Dovecot ready.

# Space separated list of trusted network ranges. Connections from these
# IPs are allowed to override their IP addresses and ports (for logging and
# for authentication checks). disable_plaintext_auth is also ignored for
# these networks. Typically you'd specify your IMAP proxy servers here.
#login_trusted_networks =

# Sepace separated list of login access check sockets (e.g. tcpwrap)
#login_access_sockets = 

# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no

# Should all processes be killed when Dovecot master process shuts down.
# Setting this to "no" means that Dovecot can be upgraded without
# forcing existing client connections to close (although that could also be
# a problem if the upgrade is e.g. because of a security fix).
#shutdown_clients = yes

# If non-zero, run mail commands via this many connections to doveadm server,
# instead of running them directly in the same process.
#doveadm_worker_count = 0
# UNIX socket or host:port used for connecting to doveadm server
#doveadm_socket_path = doveadm-server

##
## Dictionary server settings
##

# Dictionary can be used to store key=value lists. This is used by several
# plugins. The dictionary can be accessed either directly or though a
# dictionary server. The following dict block maps dictionary names to URIs
# when the server is used. These can then be referenced using URIs in format
# "proxy::<name>".

dict {
  #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}

# Most of the actual configuration gets included below. The filenames are
# first sorted by their ASCII value and parsed in that order. The 00-prefixes
# in filenames are intended to make it easier to understand the ordering.
!include conf.d/*.conf

# A config file can also tried to be included without giving an error if
# it's not found:
#!include_try /etc/dovecot/local.conf
#ssl_listen = *
За «портянки» не судите строго, а мож и нужно... кому как... Прошу помощи в решении данной «проблемы». Заранее спасибо!

 

xanderlexx
()

Nginx - не отображается запрашиваемая страница

Форум — Web-development

Доброго времени суток. Есть вопрос, который уже изрядно надоел, но решить пока не смог... Постараюсь вкратце рассказать, в чем собсно проблема: 1. есть серв с IP - 213.22.213.196 на котором крутятся около 300 сайтов - Apache. 2. есть серв в облаке амазона с белым IP - 107.22.213.196 - Nginx (10.185.8.53 - внутренний).

Настроен реверс с индейца на Nginx, по следующей конструкции:

...
AllowEncodedSlashes On
ProxyRequests Off
KeepAlive Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://107.22.213.196:80/ nocanon
ProxyPassReverse / http://107.22.213.196:80/
...
Кусок конфига для Nginx:
...
#domen.com
	server {
		server_name domen.com www.domen.com;
                limit_req   zone=domen  burst=5;
		listen 10.185.8.53;
		root /mnt/v2/domen/public_html;
		index index.html index.php;
access_log /var/log/virtualmin/domen.com_access_log;
error_log /var/log/virtualmin/domen.com_error_log;

if ($request_uri ~ " ") {
        return 444;
    }
location /cgi-bin {
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME /mnt/v2/domen/cgi-bin$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT /mnt/v2/domen;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
limit_req zone=domen burst=5;
}
location /comments {
root /mnt/v2/domen/public_html;
index *.html;
autoindex on;
limit_req zone=domen burst=5;
}
location /stats {
root /mnt/v2/domen/public_html;
index *.html;
autoindex on;
limit_req zone=domen burst=5;
}
error_page   500 502 503 504  /50x.html;
location = /50x.html {
root   /mnt/v2/domen;
}
location ~ /\.ht {
        deny  all;
    }
		ssi on;
		ssi_silent_errors off;
	}
...10.185.8.53
Запара такая - если при таких настройках переносить, скажем 10-15 сайтов, то начинается ...., т.е. - скопировал я 2 сайта с серва под индейцем и благополучно перенес на серв под нджинкс, скажем - domen1 и domen2. Далее - пытаюсь открыть domen1 - открывается... но вот с domen2 уже хуже - при попытке открыть - я вижу domen1!! Как вариант - можно раскидать все сайты на разные порты, проверял - работает. НО, если их нужно «перенести» таким образом не 10-15, а скажем 100? Мож кто сталкивался с таким гемором? Как можно побороть такую беду?

И еще - если локально в hosts прописываю 107.22.213.196 domen1 и т.д. - все открывается...

 

xanderlexx
()

apache + nginx интересная загогулина с redirect'ами

Форум — Development

Доброго времени суток уважаемые форумчане. Прошу помощи в «допиливании» конфигов apache - nginx. Суть такова: - имеется сайт под апачем http://www.example.com со следующей структурой http://www.example.com - «корень сайта» с главной страницей, на которой в таблице отображены ссылки на html файлы с оставленными коментами; http://www.example.com/comments - собственно папка, в которой сохранены все html-файлы с коментами; http://www.example.com/statistic - прочая Х.., которая на данный момент не интересует... - копия этого сайта перенесена на другой серв с nginx (структура та же); - редирект с «оригинала» на «копию» делаю следующим образом - в корне «оригинала» файлик .htaccess следующего содержания: # Options +FollowSymLinks RewriteEngine ON RewriteCond %{HTTP_HOST} ^www\.example\.com$ RewriteRule ^.*$ http://1.1.1.1:80/ [R=301] # - при попытке входа по http://www.example.com - ессно, происходит переход на http://1.1.1.1:80/ и я вижу страницу «копии» со всеми ссылками как и на оригинале. Вот теперь самое интересное - все ссылки на странице с коментариями (копия сайта) - указывают на адреса типа - http://www.example.com/comments/948twphtosfd8rju.html. И когда я пытаюсь их открыть - машина выдает 404 (что, я так понимаю, логично). Помогите пожалуйста настроить для всех страниц в папке /comments (на оригинале) редирект на их «копии». ПОЖАЛУЙСТА, буду очень признателен.

 

xanderlexx
()

Nginx, перенаправление

Форум — Web-development

Доброго времени суток, уважаемые форумчане. Прошу помощи «допилить» конфиг nginx. Ситуация следующая: есть серв с апачем, а на нем крутится 2 сайта (example.org, example2.org), назовем его «оригинал». Дальше, есть серв с nginx (сервер крутится в амазоновском облаке, 1,1,1,1 - его белый адресс) на котором эти же 2 сайта, назовем его «копией». Редирект на оригинале прописываю так (.htaccess для каждого сайта):

RewriteEngine ON
RewriteRule ^.*$ http://1,1,1,1/ [R=301,L]
Конфиг Nginx:
# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user              nginx;
worker_processes  1;

timer_resolution 100ms;
worker_rlimit_nofile 8192;
worker_priority -5;

error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

pid        /var/run/nginx.pid;


events {
    worker_connections  2048;
    use epoll;
}


http {
    include       /etc/nginx/mime.types;
	default_type application/octet-stream;
    limit_req_zone $binary_remote_addr zone=example:10m rate=3r/m;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;
    keepalive_timeout  35;
#
server_tokens off;
ignore_invalid_headers on;
client_header_timeout  3m;
client_body_timeout 3m;
send_timeout	 3m;
connection_pool_size  256;
client_header_buffer_size 4k;
large_client_header_buffers 4 32k;
request_pool_size  4k;
output_buffers   4 32k;
postpone_output  1460;
# 
    gzip on;
    gzip_min_length 1100;
    gzip_buffers 64 8k;
    gzip_comp_level 3;
    gzip_http_version 1.1;
    gzip_proxied any;
    gzip_types text/plain application/xml application/x-javascript text/css;
    
    # Load config files from the /etc/nginx/conf.d directory
    # The default server is in conf.d/default.conf
    include /etc/nginx/conf.d/*.conf;

	server_names_hash_bucket_size 128;

#example.org

	server {
		server_name example.org www.example.org;
                limit_req   zone=example  burst=4;
		listen 80;
location / {
                root /home/example/public_html;
index index.html index.htm index.php;
}
		location ^~/comments/ {
			root /home/example/public_html/comments;
			index "index.html, index.php";
		}
		
		access_log /var/log/virtualmin/example.org_access_log;
		error_log /var/log/virtualmin/example.org_error_log;
		fastcgi_param GATEWAY_INTERFACE CGI/1.1;
		fastcgi_param SERVER_SOFTWARE nginx;
		fastcgi_param QUERY_STRING $query_string;
		fastcgi_param REQUEST_METHOD $request_method;
		fastcgi_param CONTENT_TYPE $content_type;
		fastcgi_param CONTENT_LENGTH $content_length;
		fastcgi_param SCRIPT_FILENAME /home/example/cgi-bin$fastcgi_script_name;
		fastcgi_param SCRIPT_NAME $fastcgi_script_name;
		fastcgi_param REQUEST_URI $request_uri;
		fastcgi_param DOCUMENT_URI $document_uri;
		fastcgi_param DOCUMENT_ROOT /home/example/public_html;
		fastcgi_param SERVER_PROTOCOL $server_protocol;
		fastcgi_param REMOTE_ADDR $remote_addr;
		fastcgi_param REMOTE_PORT $remote_port;
		fastcgi_param SERVER_ADDR $server_addr;
		fastcgi_param SERVER_PORT $server_port;
		fastcgi_param SERVER_NAME $server_name;
		location ~ \.php$ {
#--
root /home/example;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
#--
			try_files $uri =404;
			#fastcgi_pass unix:/var/php-nginx/137999998116970.sock/socket;
		}
		fastcgi_read_timeout 30;

#
#
		root /home/example/public_html;
		index "index.html, index.php";
	}

#example2.org
	server {
		server_name example2.org www.example2.org;
		listen 80 default_server;
location / {
                root /home/example2/public_html;
index index.html index.htm index.php;
}
		location ^~/comments/ {
			root /home/example2/public_html/comments;
			index "index.html, index.php";
		}
		#index index.html index.htm index.php;
		access_log /var/log/virtualmin/example2.org_access_log;
		error_log /var/log/virtualmin/example2.org_error_log;
		fastcgi_param GATEWAY_INTERFACE CGI/1.1;
		fastcgi_param SERVER_SOFTWARE nginx;
		fastcgi_param QUERY_STRING $query_string;
		fastcgi_param REQUEST_METHOD $request_method;
		fastcgi_param CONTENT_TYPE $content_type;
		fastcgi_param CONTENT_LENGTH $content_length;
		fastcgi_param SCRIPT_FILENAME /home/example2/cgi-bin$fastcgi_script_name;
		fastcgi_param SCRIPT_NAME $fastcgi_script_name;
		fastcgi_param REQUEST_URI $request_uri;
		fastcgi_param DOCUMENT_URI $document_uri;
		fastcgi_param DOCUMENT_ROOT /home/example2/public_html;
		fastcgi_param SERVER_PROTOCOL $server_protocol;
		fastcgi_param REMOTE_ADDR $remote_addr;
		fastcgi_param REMOTE_PORT $remote_port;
		fastcgi_param SERVER_ADDR $server_addr;
		fastcgi_param SERVER_PORT $server_port;
		fastcgi_param SERVER_NAME $server_name;
		location ~ \.php$ {
#--
root /home/example2;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
#--
			try_files $uri =404;
			#fastcgi_pass unix:/var/php-nginx/13825700191983.sock/socket;
		}
		fastcgi_read_timeout 30;
#
#
		root /home/example2/public_html;
		index "index.html, index.php, index.htm, index.shtml";
	}
	root /home/;
	index index.html, index.php, index.htm, index.,shtml;
}

«Проблема» в следующем: когда в строке вбивается http://www.example2.org - то «редирект» проходит, но на http://1.1.1.1 и отображается содержимое http://www.example.org. Подскажите пожалуйста, где «хомутнул» в конфиге?

 , ,

xanderlexx
()

apache mod_rewrite. Need HELP!!!

Форум — Admin

Доброго времени суток. Помогите побороть mmod_rewriteod_rewrite. Постараюсь вкратце описать суть вопроса. Есть сайт, ну к примеру http://www.example.com (ничего примечательного), в корне которого есть index.html, на которой отображаются коментарии и есть форма для добавления новых (сайт крутится на апаче с включенным mod_rewrite). Все коментарии сохраняются в виде отдельных страниц в папке /comments - http://www.example.com/comments/.. Подскажите плиз, как правильно реализовать редирект с любой страницы этого сайта на его «копию», которая находится на другом серве с нджиниксом. еще раз повторюсь, структура копии аналогична оригиналу. «Слишком умных» прошу не беспокоиться - пусть Ваше раздутое эго останется без внмиания! Остальных, желающих помочь, готов выслушать и принять во внимание адекватную критику в свой адресс. Конфигурация хоста:

<VirtualHost 1.2.3.4:80>
  ServerName example.com
  ServerAlias www.example.com
  SuexecUserGroup "#760" "#643"
  DocumentRoot /home/example/public_html
  ErrorLog /home/example/logs/error_log
  CustomLog /home/example/logs/access_log combined
  ScriptLog /home/example/logs/cgi_log
  ScriptAlias /cgi-bin/ /home/example/cgi-bin/
  <Directory /home/example/public_html>
Options Indexes Includes ExecCGI SymLinksifOwnerMatch
allow from all
AllowOverride All
  </Directory>
  <Directory /home/example/public_html/comments>
Options Indexes Includes ExecCGI SymLinksifOwnerMatch
allow from all
AllowOverride All
  </Directory>
RewriteEngine on
RewriteBase /
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !-f
RewriteCond %{REQUEST_URI} !-d
RewriteRule ^(.*)$ index.html [L,QSA]
</VirtualHost>

 , mod-rewrite,

xanderlexx
()

IP routing проблема

Форум — Admin

Доброго времени суток. Подскажите пожалуйста как можно решить такую проблему: есть серв с «белым» IP 80.250.163.83. На нем зацеплен Virtualmin со своим 10.180.6.30. В iptables записал такое: -A PREROUTING -d 80.250.163.83 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.180.6.30:80 -A POSTROUTING -s 10.180.6.30/255.255.248.0 -o eth0 -j SNAT --to-source 80.250.163.83 ПО-идее должно работать, но пинг на 10.180.6.30 не проходит..... В чем м.б. проблема?

 ip routing

xanderlexx
()

проблема с запуском BIND-9.9.3

Форум — Admin

Доброго времени суток. Если посчитаете нубом - так и скажите, НО: - на серве был установлен BIND-9.8.2, который я снес в пользу BIND-9.9.3. «И вот тут Сатурна понесло» - проблема заключается в следующем. При запуске ругается на следующее: - /etc/named.conf:26: 'allow-recursion' redefined near 'allow-recursion' Привожу конфиг:

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
	listen-on port 53 { 127.0.0.1; };
	version "0.1";
        recursion yes;
        allow-transfer { trusted; };
        allow-recursion { trusted; };
        allow-query { any; };
	directory 	"/var/named";
        dump-file "/var/stat/cache_dump.db";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
	dnssec-validation yes;

	/* Path to ISC DLV key */
	bindkeys-file "/etc/named.iscdlv.key";

	managed-keys-directory "/var/named/dynamic";
	pid-file "/var/run/named/named.pid";
	allow-recursion {
		localnets;
		127.0.0.1;
		};
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
	type hint;
	file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
zone "0.0.127.in-addr.arpa" {
	type master;
	file "/var/named/127.0.0.rev";
	};
trusted-keys {
	};
zone "examlpe.com" {
	type master;
	file "/var/named/examlpe.com.hosts";
         allow-transfer {
		127.0.0.1;
		localnets;
		};
	};
Подскажите как побороть эту ошибку.

 , ,

xanderlexx
()

virtualmin настройка IP. Помогите разобраться.

Форум — Admin

Доброго времени суток. Вроде не считаю себя полным «нубом», но... вот уже несколько дней бьюсь с одной проблемой. Постараюсь вкратце изложить суть. Итак, есть серв на Амазоне с поднятым Virtualmin. Серв на Амазоне зацеплен на Elastic IP (ну к прмиеру 107.22.250.260). Ну и Virtualmin открывается соотвественно по этому адресу. Вот теперь начинается самое интересное - если кто знает, как правильно IP, на котором становится Virtualmin (к примеру 10.245.86.154) сделать видимым извне. Уже перерыл Virtualmin вдоль и поперёк. Как?

 , ,

xanderlexx
()

Непонятка с ProFTPD

Форум — Admin

Доброго времени суток. Помогите плиз разобраться с этим д....м ФТП. Ситуация следующая - устанавливаю ФТП (он же гр...й ProFTPD) - норм. После манипуляций в конфиге - на сервак по сети не пускает (ош. 530), хотя пользователь заведён и пароль назначен, папка у него есть. Конфиг следующий:

# This is the ProFTPD configuration file
# $Id: proftpd.conf,v 1.1 2004/02/26 17:54:30 thias Exp $

ServerName "ProFTPD server"
ServerIdent			on "FTP Server ready."
ServerAdmin root@localhost
ServerType			standalone
DefaultServer			on
AccessGrantMsg			"User %u logged in."
#DisplayConnect			/etc/ftpissue
#DisplayLogin			/etc/ftpmotd
#DisplayGoAway			/etc/ftpgoaway
DeferWelcome			off

# Use this to excude users from the chroot
DefaultRoot			~ /media/data/upload

# Use pam to authenticate (default) and be authoritative
#AuthPAMConfig			proftpd
#AuthOrder			mod_auth_pam.c* mod_auth_unix.c

# Do not perform ident nor DNS lookups (hangs when the port is filtered)
IdentLookups			off
UseReverseDNS			off

# Port 21 is the standard FTP port.
Port				21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask				022

# Default to show dot files in directory listings
ListOptions			"-a"

# See Configuration.html for these (here are the default values)
#MultilineRFC2228		off
#RootLogin			off
#LoginPasswordPrompt		on
#MaxLoginAttempts		3
#MaxClientsPerHost		none
#AllowForeignAddress		off	# For FXP

# Allow to resume not only the downloads but the uploads too
AllowRetrieveRestart		on
AllowStoreRestart		on

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances			20

# Set the user and group that the server normally runs at.
User proftp
Group proftp

# Disable sendfile by default since it breaks displaying the download speeds in
# ftptop and ftpwho
UseSendfile			no

# This is where we want to put the pid file
ScoreboardFile			/var/run/proftpd.score

# Normally, we want users to do a few things.
<Global>
  AllowOverwrite		yes
  <Limit ALL SITE_CHMOD>
    AllowAll
  </Limit>
<Directory /media/data/upload>
AllowRetrieveRestart on
AllowStoreRestart on
DeleteAbortedStores on
HideNoAccess on
AllowAll
</Directory>
RootLogin off
RequireValidShell off
UseFtpUsers on
</Global>

# Define the log formats
LogFormat			default	"%h %l %u %t \"%r\" %s %b"
LogFormat			auth	"%v [%P] %h %t \"%r\" %s"
<Anonymous /media/data/access>
User ftp
UserAlias anonymous ftp
Group ftp
RootLogin off
AnonRequirePassword off
RequireValidShell off
UseFtpUsers on
</Anonymous>
RootLogin off
RequireValidShell off
UseFtpUsers on
WtmpLog off

# TLS
# Explained at http://www.castaglia.org/proftpd/modules/mod_tls.html
#TLSEngine			on
#TLSRequired			on
#TLSRSACertificateFile		/etc/pki/tls/certs/proftpd.pem
#TLSRSACertificateKeyFile	/etc/pki/tls/certs/proftpd.pem
#TLSCipherSuite			ALL:!ADH:!DES
#TLSOptions			NoCertRequest
#TLSVerifyClient		off
##TLSRenegotiate		ctrl 3600 data 512000 required off timeout 300
#TLSLog				/var/log/proftpd/tls.log

# SQL authentication Dynamic Shared Object (DSO) loading
# See README.DSO and howto/DSO.html for more details.
#<IfModule mod_dso.c>
#   LoadModule mod_sql.c
#   LoadModule mod_sql_mysql.c
#   LoadModule mod_sql_postgres.c
#</IfModule>

# A basic anonymous configuration, with an upload directory.
#<Anonymous ~ftp>
#  User				ftp
#  Group				ftp
#  AccessGrantMsg		"Anonymous login ok, restrictions apply."
#
#  # We want clients to be able to login with "anonymous" as well as "ftp"
#  UserAlias			anonymous ftp
#
#  # Limit the maximum number of anonymous logins
#  MaxClients			10 "Sorry, max %m users -- try again later"
#
#  # Put the user into /pub right after login
#  #DefaultChdir			/pub
#
#  # We want 'welcome.msg' displayed at login, '.message' displayed in
#  # each newly chdired directory and tell users to read README* files. 
#  DisplayLogin			/welcome.msg
#  DisplayFirstChdir		.message
#  DisplayReadme			README*
#
#  # Some more cosmetic and not vital stuff
#  DirFakeUser			on ftp
#  DirFakeGroup			on ftp
#
#  # Limit WRITE everywhere in the anonymous chroot
#  <Limit WRITE SITE_CHMOD>
#    DenyAll
#  </Limit>
#
#  # An upload directory that allows storing files but not retrieving
#  # or creating directories.
#  <Directory uploads/*>
#    AllowOverwrite		no
#    <Limit READ>
#      DenyAll
#    </Limit>
#
#    <Limit STOR>
#      AllowAll
#    </Limit>
#  </Directory>
#
#  # Don't write anonymous accesses to the system wtmp file (good idea!)
#  WtmpLog			off
#
#  # Logging for the anonymous transfers
#  ExtendedLog		/var/log/proftpd/access.log WRITE,READ default
   ExtendedLog		/var/log/proftpd/auth.log AUTH auth
#
#</Anonymous>
Помогите плиз.... Если не сделаю, шеф просто порвёт на части как тузик грелку...

 , ,

xanderlexx
()

проблема с SSH

Форум — Desktop

Доброго времени суток, уважаемые форумчане. Столкнулся вот с такой проблемой. Пользую ubuntu 12.10 около года и вот в ввиду небходимости пришлось разбираться с фичами типа webmin, ssh... Теперь собственно проблема - после нескольких обновлений начал отваливаться wi-fi (ноут lenovo g560)- порылся, погуглил - решил. Далее интереснее - начала чудить система - Boot without full network support (довольно частая проблема, судя по количеству тем на форумах). После решения этой траблы - отвалился SSH (причем 22 порт оказался закрытым и любые попытки его открыть оказались безуспешными). После долгих мытарств решился - apt-get purge openssh-server... И вот тут началось самое интересное - все попытки переустановить SSH:

( читать дальше... )

Попытки скачать и скомпиить из rpm:

( читать дальше... )

ПОМОГИТЕ пожалуйста восстановить зависимости и нацонец-то переустановить SHH. Очень нужно!

 , ,

xanderlexx
()

RSS подписка на новые темы