Войти

Показать полную графическую версию : [решено] Проблема с nginx в Ubuntu


Nomad_AlexSS
31-03-2015, 22:35
Всем привет. По неизвестной причине вчера-сегодня перестали открываться сайты.
OS: Ubuntu 14.04.2 amd64
Сначала я "бомбил" apache2:

/var/log/apache2/errror.log
[Tue Mar 31 13:45:27.128746 2015] [mpm_prefork:notice] [pid 17083] AH00163: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.7 OpenSSL/1.0.1f configured -- resuming normal operations
[Tue Mar 31 13:45:27.128768 2015] [core:notice] [pid 17083] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 31 13:50:23.718578 2015] [mpm_prefork:notice] [pid 17083] AH00169: caught SIGTERM, shutting down
[Tue Mar 31 13:50:24.770065 2015] [suexec:notice] [pid 17543] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Mar 31 13:50:24.798760 2015] [:notice] [pid 17544] mod_ruid2/0.9.8 enabled
[Tue Mar 31 13:50:24.800515 2015] [mpm_prefork:notice] [pid 17544] AH00163: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.7 OpenSSL/1.0.1f configured -- resuming normal operations
[Tue Mar 31 13:50:24.800528 2015] [core:notice] [pid 17544] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 31 14:06:09.450795 2015] [mpm_prefork:notice] [pid 17544] AH00169: caught SIGTERM, shutting down
[Tue Mar 31 14:07:00.073936 2015] [suexec:notice] [pid 21415] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Mar 31 14:07:00.102698 2015] [:notice] [pid 21416] mod_ruid2/0.9.8 enabled
[Tue Mar 31 14:07:00.104474 2015] [mpm_prefork:notice] [pid 21416] AH00163: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.7 OpenSSL/1.0.1f configured -- resuming normal operations
[Tue Mar 31 14:07:00.104491 2015] [core:notice] [pid 21416] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 31 14:22:28.233823 2015] [mpm_prefork:notice] [pid 21416] AH00169: caught SIGTERM, shutting down
[Tue Mar 31 14:22:29.293027 2015] [suexec:notice] [pid 23883] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Mar 31 14:22:29.322220 2015] [:notice] [pid 23884] mod_ruid2/0.9.8 enabled
[Tue Mar 31 14:22:29.324021 2015] [mpm_prefork:notice] [pid 23884] AH00163: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.7 OpenSSL/1.0.1f configured -- resuming normal operations
[Tue Mar 31 14:22:29.324035 2015] [core:notice] [pid 23884] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 31 14:26:42.521516 2015] [mpm_prefork:notice] [pid 23884] AH00169: caught SIGTERM, shutting down
[Tue Mar 31 14:26:43.613317 2015] [:notice] [pid 24366] mod_ruid2/0.9.8 enabled
[Tue Mar 31 14:26:43.615154 2015] [mpm_prefork:notice] [pid 24366] AH00163: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.7 OpenSSL/1.0.1f configured -- resuming normal operations
[Tue Mar 31 14:26:43.615170 2015] [core:notice] [pid 24366] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 31 14:39:32.284508 2015] [mpm_prefork:notice] [pid 24366] AH00169: caught SIGTERM, shutting down
[Tue Mar 31 14:39:33.374822 2015] [:notice] [pid 25242] mod_ruid2/0.9.8 enabled
[Tue Mar 31 14:39:33.376648 2015] [mpm_prefork:notice] [pid 25242] AH00163: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.7 OpenSSL/1.0.1f configured -- resuming normal operations
[Tue Mar 31 14:39:33.376675 2015] [core:notice] [pid 25242] AH00094: Command line: '/usr/sbin/apache2'


apachectl -V
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/conf.d/192.168.0.2.conf:1
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Server version: Apache/2.4.7 (Ubuntu)
Server built: Mar 10 2015 13:05:59
Server's Module Magic Number: 20120211:27
Server loaded: APR 1.5.1-dev, APR-UTIL 1.5.3
Compiled using: APR 1.5.1-dev, APR-UTIL 1.5.3
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="mime.types"
-D SERVER_CONFIG_FILE="apache2.conf"

apachectl status
Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status
'www-browser -dump http://localhost:80/server-status' failed.
Maybe you need to install a package providing www-browser or you
need to adjust the APACHE_LYNX variable in /etc/apache2/envvars

apachectl -t
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/conf.d/192.168.0.2.conf:1
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK

apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
fcgid_module (shared)
filter_module (shared)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php5_module (shared)
rewrite_module (shared)
rpaf_module (shared)
ruid2_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
ssl_module (shared)
status_module (shared)

Пробовал переустановить:
apt-get remove apache2
apt-get remove apache2-data
ap-get install apache2
apt-get install libapache2-mod-php5
С сохранением папки /etc/apache2/...
Толку ноль.


nginx должен перкидывать с внешнего 80, на внутренний 8080. Забава в том, что если я указываю nginx'у слушать вместо 80 порта что-то другое, например 801 ("от балды"), то сайт открывается.

netstat -nlp |grep -E "(nginx|apache2|http)"

tcp 0 0 192.168.0.2:8443 0.0.0.0:* LISTEN 4315/apache2
tcp 0 0 192.168.0.2:8080 0.0.0.0:* LISTEN 4315/apache2
tcp 0 0 192.168.0.2:80 0.0.0.0:* LISTEN 4268/nginx.conf
tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN 4315/apache2
tcp 0 0 0.0.0.0:8083 0.0.0.0:* LISTEN 2021/vesta-nginx
tcp 0 0 127.0.0.1:8084 0.0.0.0:* LISTEN 4268/nginx.conf

Файрвол вырублен, на роутере DMZ на 192.168.0.2, но роутер глючный до чёртиков, как мне говорят (к примеру на нём не работают правила проброса портов NAT хотя должны). Перезагрузку сервера делал, роутер не трогал (пароль не знаю от него).

Собственно в какую сторону копать ?
P.S: nginx/1.7.11

Nomad_AlexSS
01-04-2015, 10:03
Короче сам спросил, сам ответил. Друг перезагрузил маршрутизатор сервера и всё заработало.




© OSzone.net 2001-2012