当前位置: 技术问答>linux和unix
Redhat Linux Apache启动失败
来源: 互联网 发布时间:2017-05-19
本文导语: #>service httpd start Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.0.107 for ServerName (13)Permission denied: make_sock: could not bind to address [::]:80 (13)Permission denied: make_sock: co...
#>service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.0.107 for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
-------------------------------------------------------------------------
[root@svr-esptest ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.107 svr-esptest svr-esptest.XXX.com
192.168.0.165 esptest esptest.XXX.com
192.168.0.166 console-esptest console-esptest.XXX.com
192.168.0.167 bspjbossbind_svr-esptest bspadm_lb1 bspjmx12001
#192.168.0.118 svr-oratest svr-oratest.XXX.com
---------
[root@svr-esptest ~]# vi conf/httpd.conf
ServerAdmin wsadmin@YYY.com
#ServerName awarddr.YYY.com
#ServerName esptest.XXX.com
ServerName esptest
………………
………………
#Include conf/vs/vsconsole.conf
Include conf/vs/vshttp.conf
Include conf/vs/vshttps.conf
------
[root@svr-esptest ~]# vi conf/vs/vshttp.conf
Listen 192.168.0.165:80
NameVirtualHost 192.168.0.165:80
RewriteEngine on
RewriteCond %{REQUEST_URI} ^.*/esop_custom/.*.$
RewriteCond %{DOCUMENT_ROOT}/web_custom/%{REQUEST_FILENAME} -f
RewriteRule ^/(.*) /web_custom/%{REQUEST_FILENAME} [PT]
ServerAdmin wsadmin@YYY.com
DocumentRoot ${httpDocsRoot}/bsp
ServerName esptest
AddDefaultCharset utf-8
ErrorLog "|${httpdRoot}/bin/rotatelogs ${httpLogdir}/bsp_https-error_log.%Y%m%d 86400"
CustomLog "|${httpdRoot}/bin/rotatelogs ${httpLogdir}/bsp_https-access_log.%Y%m%d 86400" combined
Include conf/modjk/jkmounts_std.conf
------
[root@svr-esptest ~]# vi conf/vs/vshttps.conf
isten 192.168.0.165:443
NameVirtualHost 192.168.0.165:443
RewriteEngine on
RewriteCond %{REQUEST_URI} ^.*/esop_custom/.*.$
RewriteCond %{DOCUMENT_ROOT}/web_custom/%{REQUEST_FILENAME} -f
RewriteRule ^/(.*) https://%{SERVER_NAME}/web_custom/$1 [R]
ServerAdmin wsadmin@YYY.com
DocumentRoot ${httpDocsRoot}/broad-ocean
ServerName esptest
AddDefaultCharset utf-8
ErrorLog "|${httpdRoot}/bin/rotatelogs ${httpLogdir}/broad_https-error_log.%Y%m%d 86400"
CustomLog "|${httpdRoot}/bin/rotatelogs ${httpLogdir}/broad_https-access_log.%Y%m%d 86400" combined
Include conf/modjk/jkmounts_std.conf
Include conf/ssl.conf/wildbs.conf
-----wildbs.conf ----
[root@svr-esptest conf]# vi ssl.conf/wildbs.conf
BrowserMatch Firefox nokeepalive
SetEnvIf User-Agent ".*MSIE.*"
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0
#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLEngine on
#SSLProtocol -all +TLSv1 +TLSv1.2 +TLSv1.1 +SSLv3
SSLProtocol -all +TLSv1 +SSLv3
SSLCipherSuite HIGH:MEDIUM:!MD5:!3DES:!aNULL:!EDH:!128
SSLHonorCipherOrder on
#SSLCipherSuite HIGH:+SSLv3:!SSLv2
SSLCertificateFile conf/ssl.conf/crt/wild.esptest.XXX.com.crt
SSLCertificateKeyFile conf/ssl.conf/key/wildbs_priv.key
~
哪位高人能帮忙指点一下?在网上搜索了几天,没有找到对应的方法
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.0.107 for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
-------------------------------------------------------------------------
[root@svr-esptest ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.107 svr-esptest svr-esptest.XXX.com
192.168.0.165 esptest esptest.XXX.com
192.168.0.166 console-esptest console-esptest.XXX.com
192.168.0.167 bspjbossbind_svr-esptest bspadm_lb1 bspjmx12001
#192.168.0.118 svr-oratest svr-oratest.XXX.com
---------
[root@svr-esptest ~]# vi conf/httpd.conf
ServerAdmin wsadmin@YYY.com
#ServerName awarddr.YYY.com
#ServerName esptest.XXX.com
ServerName esptest
………………
………………
#Include conf/vs/vsconsole.conf
Include conf/vs/vshttp.conf
Include conf/vs/vshttps.conf
------
[root@svr-esptest ~]# vi conf/vs/vshttp.conf
Listen 192.168.0.165:80
NameVirtualHost 192.168.0.165:80
RewriteEngine on
RewriteCond %{REQUEST_URI} ^.*/esop_custom/.*.$
RewriteCond %{DOCUMENT_ROOT}/web_custom/%{REQUEST_FILENAME} -f
RewriteRule ^/(.*) /web_custom/%{REQUEST_FILENAME} [PT]
ServerAdmin wsadmin@YYY.com
DocumentRoot ${httpDocsRoot}/bsp
ServerName esptest
AddDefaultCharset utf-8
ErrorLog "|${httpdRoot}/bin/rotatelogs ${httpLogdir}/bsp_https-error_log.%Y%m%d 86400"
CustomLog "|${httpdRoot}/bin/rotatelogs ${httpLogdir}/bsp_https-access_log.%Y%m%d 86400" combined
Include conf/modjk/jkmounts_std.conf
------
[root@svr-esptest ~]# vi conf/vs/vshttps.conf
isten 192.168.0.165:443
NameVirtualHost 192.168.0.165:443
RewriteEngine on
RewriteCond %{REQUEST_URI} ^.*/esop_custom/.*.$
RewriteCond %{DOCUMENT_ROOT}/web_custom/%{REQUEST_FILENAME} -f
RewriteRule ^/(.*) https://%{SERVER_NAME}/web_custom/$1 [R]
ServerAdmin wsadmin@YYY.com
DocumentRoot ${httpDocsRoot}/broad-ocean
ServerName esptest
AddDefaultCharset utf-8
ErrorLog "|${httpdRoot}/bin/rotatelogs ${httpLogdir}/broad_https-error_log.%Y%m%d 86400"
CustomLog "|${httpdRoot}/bin/rotatelogs ${httpLogdir}/broad_https-access_log.%Y%m%d 86400" combined
Include conf/modjk/jkmounts_std.conf
Include conf/ssl.conf/wildbs.conf
-----wildbs.conf ----
[root@svr-esptest conf]# vi ssl.conf/wildbs.conf
BrowserMatch Firefox nokeepalive
SetEnvIf User-Agent ".*MSIE.*"
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0
#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLEngine on
#SSLProtocol -all +TLSv1 +TLSv1.2 +TLSv1.1 +SSLv3
SSLProtocol -all +TLSv1 +SSLv3
SSLCipherSuite HIGH:MEDIUM:!MD5:!3DES:!aNULL:!EDH:!128
SSLHonorCipherOrder on
#SSLCipherSuite HIGH:+SSLv3:!SSLv2
SSLCertificateFile conf/ssl.conf/crt/wild.esptest.XXX.com.crt
SSLCertificateKeyFile conf/ssl.conf/key/wildbs_priv.key
~
哪位高人能帮忙指点一下?在网上搜索了几天,没有找到对应的方法
|
|
在 httpd.conf 文件里面加入一句:
ServerName localhost:80
|
或者在文件 /etc/hosts 里面添加一行:
ServerName localhost:80
重启 Apache
ServerName localhost:80
重启 Apache
|
请使用root启动apache
普通用户无法使用80端口