×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

谢谢了. 监听的http端口就是80.8081,8082,8000. 没有装ssl协议,所以没有https的,wget也证明了这一点.因为netstat没有-p参数,不知道80哪来的,但确实有缺省的PBO的web服务可以访问;8081是lighttpd提供的,是这个定制的固件加进去的,不过我没找到8082由

本文发表在 rolia.net 枫下论坛谁提供服务,而且也是无法访问的,和我自己的8000一样(端口都是开的).下面是我的httpd.conf的内容,我确实想做成proxy,但即使把proxy的注释了,8000还是无法访问.
我因为不懂apache,自己改的不多,主要是加了proxy(但又注释了),改动了一下doc root(把原来lighttpd的docroot内容copy了一下啊变成www2目录)
=========================================================

ServerRoot "/opt"

#Listen 12.34.56.78:80
Listen 8000

LoadModule authn_file_module libexec/mod_authn_file.so
LoadModule authn_dbm_module libexec/mod_authn_dbm.so
LoadModule authn_anon_module libexec/mod_authn_anon.so
LoadModule authn_dbd_module libexec/mod_authn_dbd.so
LoadModule authn_default_module libexec/mod_authn_default.so
LoadModule authz_host_module libexec/mod_authz_host.so
LoadModule authz_groupfile_module libexec/mod_authz_groupfile.so
LoadModule authz_user_module libexec/mod_authz_user.so
LoadModule authz_dbm_module libexec/mod_authz_dbm.so
LoadModule authz_owner_module libexec/mod_authz_owner.so
LoadModule authz_default_module libexec/mod_authz_default.so
LoadModule auth_basic_module libexec/mod_auth_basic.so
LoadModule auth_digest_module libexec/mod_auth_digest.so
LoadModule file_cache_module libexec/mod_file_cache.so
LoadModule cache_module libexec/mod_cache.so
LoadModule disk_cache_module libexec/mod_disk_cache.so
LoadModule mem_cache_module libexec/mod_mem_cache.so
LoadModule dbd_module libexec/mod_dbd.so
LoadModule dumpio_module libexec/mod_dumpio.so
LoadModule reqtimeout_module libexec/mod_reqtimeout.so
LoadModule ext_filter_module libexec/mod_ext_filter.so
LoadModule include_module libexec/mod_include.so
LoadModule filter_module libexec/mod_filter.so
LoadModule substitute_module libexec/mod_substitute.so
LoadModule deflate_module libexec/mod_deflate.so
LoadModule ldap_module libexec/mod_ldap.so
LoadModule log_config_module libexec/mod_log_config.so
LoadModule log_forensic_module libexec/mod_log_forensic.so
LoadModule logio_module libexec/mod_logio.so
LoadModule env_module libexec/mod_env.so
LoadModule mime_magic_module libexec/mod_mime_magic.so
LoadModule cern_meta_module libexec/mod_cern_meta.so
LoadModule expires_module libexec/mod_expires.so
LoadModule headers_module libexec/mod_headers.so
LoadModule ident_module libexec/mod_ident.so
LoadModule usertrack_module libexec/mod_usertrack.so
LoadModule unique_id_module libexec/mod_unique_id.so
LoadModule setenvif_module libexec/mod_setenvif.so
LoadModule version_module libexec/mod_version.so
LoadModule version_module libexec/mod_version.so
LoadModule proxy_module libexec/mod_proxy.so
LoadModule proxy_connect_module libexec/mod_proxy_connect.so
LoadModule proxy_ftp_module libexec/mod_proxy_ftp.so
LoadModule proxy_http_module libexec/mod_proxy_http.so
LoadModule proxy_scgi_module libexec/mod_proxy_scgi.so
LoadModule proxy_ajp_module libexec/mod_proxy_ajp.so
LoadModule proxy_balancer_module libexec/mod_proxy_balancer.so
LoadModule ssl_module libexec/mod_ssl.so
LoadModule mime_module libexec/mod_mime.so
LoadModule dav_module libexec/mod_dav.so
LoadModule status_module libexec/mod_status.so
LoadModule autoindex_module libexec/mod_autoindex.so
LoadModule asis_module libexec/mod_asis.so
LoadModule info_module libexec/mod_info.so
LoadModule cgid_module libexec/mod_cgid.so
LoadModule dav_fs_module libexec/mod_dav_fs.so
LoadModule vhost_alias_module libexec/mod_vhost_alias.so
LoadModule negotiation_module libexec/mod_negotiation.so
LoadModule dir_module libexec/mod_dir.so
LoadModule imagemap_module libexec/mod_imagemap.so
LoadModule actions_module libexec/mod_actions.so
LoadModule speling_module libexec/mod_speling.so
LoadModule userdir_module libexec/mod_userdir.so
LoadModule alias_module libexec/mod_alias.so
LoadModule rewrite_module libexec/mod_rewrite.so

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

User apache
Group root

</IfModule>
</IfModule>

ServerAdmin you@example.com

#ServerName www.example.com:8000

DocumentRoot "/opt/share/www2"

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/opt/share/www2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<IfModule dir_module>
DirectoryIndex index.html
DirectoryIndex index.html
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

ErrorLog "var/apache2/log/error_log"

LogLevel debug

####################################################################
#<IfModule proxy_module>
# ProxyRequests On
# ProxyVia Block
# AllowCONNECT 22
# <Proxy *>
# Order allow,deny
# Allow from all
## AuthType Basic
## AuthName "identify yourself" #don't use the word 'proxy' here!
## AuthUserFile /usr/local/etc/apache22/proxy.passwd
## Require valid-user
# </Proxy>
#</IfModule>
####################################################################

<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "var/apache2/log/access_log" common
#CustomLog "var/apache2/log/access_log" combined
</IfModule>

<IfModule alias_module>
# Redirect permanent /foo http://www.example.com/bar
# Alias /webpath /full/filesystem/path
ScriptAlias /cgi-bin/ "/opt/share/apache2/cgi-bin/"
</IfModule>

<IfModule cgid_module>
#Scriptsock var/apache2/run/cgisock
</IfModule>

<Directory "/opt/share/apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig etc/apache2/mime.types
#AddType application/x-gzip .tgz
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#AddHandler cgi-script .cgi
#AddHandler type-map var
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>

#MIMEMagicFile etc/apache2/magic

#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html

#EnableMMAP off
#EnableSendfile off

#Include etc/apache2/extra/httpd-mpm.conf
#Include etc/apache2/extra/httpd-multilang-errordoc.conf
#Include etc/apache2/extra/httpd-autoindex.conf
#Include etc/apache2/extra/httpd-languages.conf
#Include etc/apache2/extra/httpd-userdir.conf
#Include etc/apache2/extra/httpd-info.conf
#Include etc/apache2/extra/httpd-vhosts.conf
#Include etc/apache2/extra/httpd-manual.conf
#Include etc/apache2/extra/httpd-dav.conf
#Include etc/apache2/extra/httpd-default.conf
#Include etc/apache2/extra/httpd-ssl.conf

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / 学科技术讨论 / 坛子里有没有apache的高人?在一个高清播放器里装了个apache,经过修改配置,可以启动了,但是打开浏览器显示不出任何东西,浏览器状态是"Waiting for IP...".netstat可以看到端口连接已经建立.error-log里看不出什么可疑,access-log没有记录
    系统是Linux PBO1 2.6.12.6-VENUS #10,内置有web server在80,8081,8082上,但ps里只找到了lighttpd监听8081.为了减少冲突,也杀掉了.我的apache听8000,应该也不冲突.请问还有什么招看看问题在哪里?
    • 补充一下:启动显示~ # apachectl start httpd: Could not reliably determine the server's fully qualified domain name, using c0a8:51d:78b1:f27f:: for ServerName
      • 这只是个warning,没关系的。 "telnet ip 8000" 然后 “GET / HTTP/1.0" 回车, 或者 "GET / HTTP/1.1" 有什么输出? 或者用wget 去访问,看有什么结果。
        • 结果是什么都没有. 又试了80口,回车后什么都没有,ctrl-C以后问l/c/z/e.选了l,是goto line mode,之后一堆输出,最前面有200OK,看来8000后还是有问题;同样,wget 80就有输出, 8000就什么都没有,也回不到console, 必须ctrl-C中断. 下面该怎么做?
          • 没仔细看你的原贴,跟着小兔让你去试8000端口, 现在看来8000可能不是http service,是什么别的东西。你先确定你的apache 到底是在听那些端口?
            netstat -na | grep LIST | grep -i -v STREAM

            看看那些口是在被听,
            如果你的系统 netstat 支持 -p :
            netstat -nap | grep LIST | grep httpd

            这样可以看哪些端口被httpd听。

            看你原贴,应该是80和8081,8082.


            你可以用wget 去试80,8081,8082口,另外8081,8082可能是https, 所以几种都试试:

            wget http://ip:8000
            wget https://ip:8000
            wget http://ip:8081
            wget https://ip:8081
            wget http://ip:8082
            wget https://ip:8082

            看看有没有工作的。

            你的log 里显示有 proxy, 所以你的apache 也可能只是作为一个proxy 工作,实际的 web service 被 proxy到另一个 ip:port 去了。你可以贴一下httpd.conf
            • 谢谢了. 监听的http端口就是80.8081,8082,8000. 没有装ssl协议,所以没有https的,wget也证明了这一点.因为netstat没有-p参数,不知道80哪来的,但确实有缺省的PBO的web服务可以访问;8081是lighttpd提供的,是这个定制的固件加进去的,不过我没找到8082由
              本文发表在 rolia.net 枫下论坛谁提供服务,而且也是无法访问的,和我自己的8000一样(端口都是开的).下面是我的httpd.conf的内容,我确实想做成proxy,但即使把proxy的注释了,8000还是无法访问.
              我因为不懂apache,自己改的不多,主要是加了proxy(但又注释了),改动了一下doc root(把原来lighttpd的docroot内容copy了一下啊变成www2目录)
              =========================================================

              ServerRoot "/opt"

              #Listen 12.34.56.78:80
              Listen 8000

              LoadModule authn_file_module libexec/mod_authn_file.so
              LoadModule authn_dbm_module libexec/mod_authn_dbm.so
              LoadModule authn_anon_module libexec/mod_authn_anon.so
              LoadModule authn_dbd_module libexec/mod_authn_dbd.so
              LoadModule authn_default_module libexec/mod_authn_default.so
              LoadModule authz_host_module libexec/mod_authz_host.so
              LoadModule authz_groupfile_module libexec/mod_authz_groupfile.so
              LoadModule authz_user_module libexec/mod_authz_user.so
              LoadModule authz_dbm_module libexec/mod_authz_dbm.so
              LoadModule authz_owner_module libexec/mod_authz_owner.so
              LoadModule authz_default_module libexec/mod_authz_default.so
              LoadModule auth_basic_module libexec/mod_auth_basic.so
              LoadModule auth_digest_module libexec/mod_auth_digest.so
              LoadModule file_cache_module libexec/mod_file_cache.so
              LoadModule cache_module libexec/mod_cache.so
              LoadModule disk_cache_module libexec/mod_disk_cache.so
              LoadModule mem_cache_module libexec/mod_mem_cache.so
              LoadModule dbd_module libexec/mod_dbd.so
              LoadModule dumpio_module libexec/mod_dumpio.so
              LoadModule reqtimeout_module libexec/mod_reqtimeout.so
              LoadModule ext_filter_module libexec/mod_ext_filter.so
              LoadModule include_module libexec/mod_include.so
              LoadModule filter_module libexec/mod_filter.so
              LoadModule substitute_module libexec/mod_substitute.so
              LoadModule deflate_module libexec/mod_deflate.so
              LoadModule ldap_module libexec/mod_ldap.so
              LoadModule log_config_module libexec/mod_log_config.so
              LoadModule log_forensic_module libexec/mod_log_forensic.so
              LoadModule logio_module libexec/mod_logio.so
              LoadModule env_module libexec/mod_env.so
              LoadModule mime_magic_module libexec/mod_mime_magic.so
              LoadModule cern_meta_module libexec/mod_cern_meta.so
              LoadModule expires_module libexec/mod_expires.so
              LoadModule headers_module libexec/mod_headers.so
              LoadModule ident_module libexec/mod_ident.so
              LoadModule usertrack_module libexec/mod_usertrack.so
              LoadModule unique_id_module libexec/mod_unique_id.so
              LoadModule setenvif_module libexec/mod_setenvif.so
              LoadModule version_module libexec/mod_version.so
              LoadModule version_module libexec/mod_version.so
              LoadModule proxy_module libexec/mod_proxy.so
              LoadModule proxy_connect_module libexec/mod_proxy_connect.so
              LoadModule proxy_ftp_module libexec/mod_proxy_ftp.so
              LoadModule proxy_http_module libexec/mod_proxy_http.so
              LoadModule proxy_scgi_module libexec/mod_proxy_scgi.so
              LoadModule proxy_ajp_module libexec/mod_proxy_ajp.so
              LoadModule proxy_balancer_module libexec/mod_proxy_balancer.so
              LoadModule ssl_module libexec/mod_ssl.so
              LoadModule mime_module libexec/mod_mime.so
              LoadModule dav_module libexec/mod_dav.so
              LoadModule status_module libexec/mod_status.so
              LoadModule autoindex_module libexec/mod_autoindex.so
              LoadModule asis_module libexec/mod_asis.so
              LoadModule info_module libexec/mod_info.so
              LoadModule cgid_module libexec/mod_cgid.so
              LoadModule dav_fs_module libexec/mod_dav_fs.so
              LoadModule vhost_alias_module libexec/mod_vhost_alias.so
              LoadModule negotiation_module libexec/mod_negotiation.so
              LoadModule dir_module libexec/mod_dir.so
              LoadModule imagemap_module libexec/mod_imagemap.so
              LoadModule actions_module libexec/mod_actions.so
              LoadModule speling_module libexec/mod_speling.so
              LoadModule userdir_module libexec/mod_userdir.so
              LoadModule alias_module libexec/mod_alias.so
              LoadModule rewrite_module libexec/mod_rewrite.so

              <IfModule !mpm_netware_module>
              <IfModule !mpm_winnt_module>

              User apache
              Group root

              </IfModule>
              </IfModule>

              ServerAdmin you@example.com

              #ServerName www.example.com:8000

              DocumentRoot "/opt/share/www2"

              <Directory />
              Options FollowSymLinks
              AllowOverride None
              Order deny,allow
              Deny from all
              </Directory>
              <Directory "/opt/share/www2">
              Options Indexes FollowSymLinks
              AllowOverride None
              Order allow,deny
              Allow from all
              </Directory>

              <IfModule dir_module>
              DirectoryIndex index.html
              DirectoryIndex index.html
              </IfModule>

              <FilesMatch "^\.ht">
              Order allow,deny
              Deny from all
              Satisfy All
              </FilesMatch>

              ErrorLog "var/apache2/log/error_log"

              LogLevel debug

              ####################################################################
              #<IfModule proxy_module>
              # ProxyRequests On
              # ProxyVia Block
              # AllowCONNECT 22
              # <Proxy *>
              # Order allow,deny
              # Allow from all
              ## AuthType Basic
              ## AuthName "identify yourself" #don't use the word 'proxy' here!
              ## AuthUserFile /usr/local/etc/apache22/proxy.passwd
              ## Require valid-user
              # </Proxy>
              #</IfModule>
              ####################################################################

              <IfModule log_config_module>
              LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
              LogFormat "%h %l %u %t \"%r\" %>s %b" common
              <IfModule logio_module>
              LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
              </IfModule>
              CustomLog "var/apache2/log/access_log" common
              #CustomLog "var/apache2/log/access_log" combined
              </IfModule>

              <IfModule alias_module>
              # Redirect permanent /foo http://www.example.com/bar
              # Alias /webpath /full/filesystem/path
              ScriptAlias /cgi-bin/ "/opt/share/apache2/cgi-bin/"
              </IfModule>

              <IfModule cgid_module>
              #Scriptsock var/apache2/run/cgisock
              </IfModule>

              <Directory "/opt/share/apache2/cgi-bin">
              AllowOverride None
              Options None
              Order allow,deny
              Allow from all
              </Directory>

              DefaultType text/plain

              <IfModule mime_module>
              TypesConfig etc/apache2/mime.types
              #AddType application/x-gzip .tgz
              #AddEncoding x-compress .Z
              #AddEncoding x-gzip .gz .tgz
              AddType application/x-compress .Z
              AddType application/x-gzip .gz .tgz
              #AddHandler cgi-script .cgi
              #AddHandler type-map var
              #AddType text/html .shtml
              #AddOutputFilter INCLUDES .shtml
              </IfModule>

              #MIMEMagicFile etc/apache2/magic

              #ErrorDocument 500 "The server made a boo boo."
              #ErrorDocument 404 /missing.html
              #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
              #ErrorDocument 402 http://www.example.com/subscription_info.html

              #EnableMMAP off
              #EnableSendfile off

              #Include etc/apache2/extra/httpd-mpm.conf
              #Include etc/apache2/extra/httpd-multilang-errordoc.conf
              #Include etc/apache2/extra/httpd-autoindex.conf
              #Include etc/apache2/extra/httpd-languages.conf
              #Include etc/apache2/extra/httpd-userdir.conf
              #Include etc/apache2/extra/httpd-info.conf
              #Include etc/apache2/extra/httpd-vhosts.conf
              #Include etc/apache2/extra/httpd-manual.conf
              #Include etc/apache2/extra/httpd-dav.conf
              #Include etc/apache2/extra/httpd-default.conf
              #Include etc/apache2/extra/httpd-ssl.conf

              <IfModule ssl_module>
              SSLRandomSeed startup builtin
              SSLRandomSeed connect builtin
              </IfModule>更多精彩文章及讨论,请光临枫下论坛 rolia.net
              • Listen 8000 => Listen *:8000
                • 试了,没有区别:((
              • netstat 不支持 -p, 那么系统有 lsof 吗? 另一个方法是 lsof | grep -i tcp | grep -i listen 你能看到那个进程听那个端口。
                • 装了一个lsof, 这是输出. 8000是httpd没错,不过80和8081都是由root跑得,可是我这个apache不让root跑,搞得我非建了一个apache账户,也不知权限有没有设对.
                  本文发表在 rolia.net 枫下论坛~ # lsof | grep -i tcp | grep -i listen
                  inetd 187 root 4u IPv4 534 TCP *:telnet (LISTEN)
                  inetd 187 root 5u IPv4 535 TCP *:http (LISTEN)
                  DvdPlayer 223 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 230 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 231 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 232 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 239 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 240 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  tty_monit 241 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 244 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  AbsAP_dis 245 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  RPC_threa 246 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  RPC_threa 247 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  RPC_threa 248 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  RPC_threa 249 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  RPC_threa 250 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  RPC_threa 251 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  VFD_Updat 253 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  LoadMedia 400 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 403 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 404 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  DvdPlayer 405 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  WEBCGI 406 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  HDMI_MONI 407 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  udhcpc 451 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  smbd 603 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  smbd 603 root 43u IPv4 1262 TCP *:microsoft-ds (LISTEN)
                  smbd 603 root 44u IPv4 1263 TCP *:netbios-ssn (LISTEN)
                  nmbd 606 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  smbd 610 root 13u IPv4 614 TCP *:8082 (LISTEN)
                  portmap 708 daemon 4u IPv4 1446 TCP *:sunrpc (LISTEN)
                  lighttpd 712 root 4u IPv4 1454 TCP *:tproxy (LISTEN)
                  httpd 1205 root 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1379 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1380 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1381 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1382 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1383 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1384 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1385 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1386 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1387 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1388 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1389 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1390 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1391 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1392 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1393 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1394 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1395 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1396 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1397 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1398 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1399 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1400 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1401 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1402 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1403 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1404 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1405 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1406 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1407 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1408 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1409 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                  httpd 1410 apache 3u IPv4 2150 TCP *:8000 (LISTEN)更多精彩文章及讨论,请光临枫下论坛 rolia.net
                  • 看着是起来了啊。ServerRoot "/opt",ErrorLog "var/apache2/log/error_log, 看来你的配置都是相对路径,你看看 /opt/var/apache2/log/ 里有没有error_log,看能找到点什么?
              • ErrorLog "var/apache2/log/error_log" 似乎少个 /。 另外你load 了太多module,建议全注释掉,然后重启httpd (修改配置后一定要重启或者reload 配置)。如果工作,可以一点一点加回去,看哪个module有问题。
                • 试了,注释了也一样:(
    • log如下:
      本文发表在 rolia.net 枫下论坛[Thu Jan 07 16:58:49 2010] [info] mod_unique_id: using ip addr 192.168.5.29
      [Thu Jan 07 16:58:49 2010] [info] Init: Seeding PRNG with 136 bytes of entropy
      [Thu Jan 07 16:58:49 2010] [info] Init: Generating temporary RSA private keys (512/1024 bits)
      [Thu Jan 07 16:58:51 2010] [info] Init: Generating temporary DH parameters (512/1024 bits)
      [Thu Jan 07 16:58:51 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
      [Thu Jan 07 16:58:51 2010] [info] Init: Initializing (virtual) servers for SSL
      [Thu Jan 07 16:58:51 2010] [info] mod_ssl/2.2.20 compiled against Server: Apache/2.2.20, Library: OpenSSL/0.9.7m
      [Thu Jan 07 16:58:52 2010] [notice] Digest: generating secret for digest authentication ...
      [Thu Jan 07 16:58:52 2010] [notice] Digest: done
      [Thu Jan 07 16:58:52 2010] [info] APR LDAP: Built with OpenLDAP LDAP SDK
      [Thu Jan 07 16:58:52 2010] [info] LDAP: SSL support available
      [Thu Jan 07 16:58:52 2010] [info] mod_unique_id: using ip addr 192.168.5.29
      [Thu Jan 07 16:58:53 2010] [info] Init: Seeding PRNG with 136 bytes of entropy
      [Thu Jan 07 16:58:53 2010] [info] Init: Generating temporary RSA private keys (512/1024 bits)
      [Thu Jan 07 16:58:55 2010] [info] Init: Generating temporary DH parameters (512/1024 bits)
      [Thu Jan 07 16:58:55 2010] [info] Init: Initializing (virtual) servers for SSL
      [Thu Jan 07 16:58:55 2010] [info] mod_ssl/2.2.20 compiled against Server: Apache/2.2.20, Library: OpenSSL/0.9.7m
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 0 in child 2644 for worker proxy:forward
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1914): proxy: initialized worker 0 in child 2644 for (*) min=0 max=25 smax=25
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 1 in child 2644 for worker proxy:reverse
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1914): proxy: initialized worker 1 in child 2644 for (*) min=0 max=25 smax=25
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 0 in child 2646 for worker proxy:forward
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1837): proxy: worker proxy:forward already initialized
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1914): proxy: initialized worker 0 in child 2646 for (*) min=0 max=25 smax=25
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 1 in child 2646 for worker proxy:reverse
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1837): proxy: worker proxy:reverse already initialized
      [Thu Jan 07 16:58:55 2010] [debug] proxy_util.c(1914): proxy: initialized worker 1 in child 2646 for (*) min=0 max=25 smax=25
      [Thu Jan 07 16:58:55 2010] [notice] Apache/2.2.20 (Unix) mod_ssl/2.2.20 OpenSSL/0.9.7m DAV/2 configured -- resuming normal operations
      [Thu Jan 07 16:58:55 2010] [info] Server built: Sep 3 2011 21:07:41
      [Thu Jan 07 16:58:55 2010] [debug] worker.c(1757): AcceptMutex: sysvsem (default: sysvsem)更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • did you try telnet hostname 8000 ( from both local and remote )?
      • 试了, 有反应
        • (1) got response both locally & remotely? can u post the response? (2) also check if file system full or accessible by apache process id (3) ps -al | grep http ( ?apache )
          • 1.有反应就是没有拒绝,有服务在听端口,可是没有任何输出.没法远程试,因为telnet没法设proxy:(2.我也想知道.我自己创建了一个apache用户,root组,但是没有额外设权限.应该给什么权限?3.ps都有输出,进程起来了
            • (1) check user/group directives in apache config (2) check if pid & error/access log created ( can compare with the instance listening 80/8081 as root ).u may need to use different file name for pid & logs (3) kill all 8000 httpd process before retry
              • 我的设置是user apache;group root;并且把docroot改成apache:root了,还设成了777;error-log有内容,access-log是空的;inetd和lighttpd都有pid,可是httpd没有.哪里能定义pid设置?
                • pid也找到了,有的,不过是root:root,有点奇怪吗?
                  • 不奇怪。
                    httpd 1205 root 3u IPv4 2150 TCP *:8000 (LISTEN)
                    httpd 1379 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                    httpd 1380 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                    httpd 1381 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                    httpd 1382 apache 3u IPv4 2150 TCP *:8000 (LISTEN)
                    httpd 1383 apache 3u IPv4 2150 TCP *:8000 (LISTEN)


                    第一个进程是root,所有的子进程都是apache. 不过还是不知道为什么不工作。

                    如果没有error_log,那可能只能通过strace了,估计很麻烦,重装吧:-)
                  • it seems there're 2 httpd instances (A) lighttpd listening to 80/8081/8082 (B) yours listening to 8000. can B ( run as apachectl:root ) overwrite A pid ( root:root ) & logs? u need to set (B) pid/log use different file name
                    • pid都是不同位置的,log也不在一起。。
            • 这句没明白,为什么远程测试要proxy?如果你可以ssh到这个box,你可以设个ssh tunnel 到8000口,那就可以远程试了?
              • 这个box没有sshd,只有telnetd.我从外面ssh到家里其他box再telnet其8000口,在netstat里是可以看到8000有连接建立的;若是外面使用浏览器直接连,也是可以看到8000建立连接的
                • 如果你不在家,可以通过ssh 到家里一台有ssh的机器,同时建立ssh tunnel 到这台机器的8000端口,就能远程测试了。
                  • 试了,还是一样,就是没有拒绝,但也没有任何输出.netstat显示的是syc_recv,不过要是使用浏览器就是established.还有什么主意?重装恐怕没用,重装了很多次了,使用ipkg重装的
                    • 你这是个比较特别的系统,如果只是要个web server, 不是已经有个工作在80口了吗?你可以查/etc/xinet.d/,看http 是怎么配的,然后改它的配置文件。
                      • 我需要forward proxy.内置的xinet.d肯定不支持;lighttpd支持proxy,但是支持forward proxy吗?我网上查过,没人说支持,你知道吗?
                        • as long as it has a mod_proxy module, it should support proxy ( forward proxy should be the most common usage of proxy )
                          • 谢谢提醒.以前简单search了一下,多说lity不能forward proxy,就没试.刚才一试,http完全可以forward到其他host上,但是我的要求是forward到22端口,看netstat是建立了和目的22的连接,但是
                            使用putty等候半天后是连接关闭;使用telnet后最后返回的是HTTP的bad request.是不是因为端口是lity在听,所以要用lity能懂的协议(http/s)才行?
                            • You need proxy to allowconnect. looks like lighttpd doesn't support it. http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_proxy-proxy it doesn't have a allowconnect option.
                              Not sure why you need this.

                              If you just want to be able to ssh into a home machine on port 80, you can just configure your router to forward public ip:80 -> internal linux:22

                              Then you can ssh from that machine to any internal machine.

                              The only benefit for a connect proxy is if you have one, you can use it as http proxy to ssh into any internal linux machines, but doesn't seem to be a big gain.
                              • that way a IDS signature can easy detect SSH client initial a connection...