青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

colorful

zc qq:1337220912

 

apache 開啟多站點(diǎn)


http://zhangyong333revice.blog.163.com/blog/static/1131518832011101811237149/
http://hi.baidu.com/dspace/item/68b67705a9c53bd21ff046a1
http://zhb1208.iteye.com/blog/1432957
http://zhidao.baidu.com/question/285759208.html
http://michaelkang.blog.51cto.com/1553154/1065251
http://blog.sina.com.cn/s/blog_7e56997901016bw7.html
http://wenku.baidu.com/view/95b2361ca8114431b90dd8c0.html
http://www.cnblogs.com/see7di/archive/2011/06/15/2239756.html
http://zhidao.baidu.com/question/472396507.html
http://blog.csdn.net/yongshiok/article/details/6936960
http://www.xker.com/page/e2010/0925/98279.html
http://www.codesky.net/article/201101/149128.html

如何更改linux下的Apache端口號(hào)

一、修改/etc/httpd/conf/httpd.conf文件中的監(jiān)聽端口號(hào)

Listen 80

把80修改成需要的號(hào),如8000,即

Listen 8000
二、查看SELinux下http相關(guān)端口

# semanage port -l|grep http
http_cache_port_t              tcp      3128, 8080, 8118, 10001-10010
http_cache_port_t              udp      3130
http_port_t                    tcp      80, 443, 488, 8008, 8009, 8443
pegasus_http_port_t            tcp      5988
pegasus_https_port_t           tcp      5989

發(fā)現(xiàn)8000不在其范圍之內(nèi),所以需要另外添加,方法如下:

# semanage port -a -t http_port_t -p tcp 8000

再次查看,

# semanage port -l|grep http
http_cache_port_t              tcp      3128, 8080, 8118, 10001-10010
http_cache_port_t              udp      3130
http_port_t                    tcp      8000, 80, 443, 488, 8008, 8009, 8443
pegasus_http_port_t            tcp      5988
pegasus_https_port_t           tcp      5989

三、在防火墻中開放新添加的端口

修改/etc/sysconfig/iptables文件,在文件中添加如一行:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8008 -j ACCEPT

四、重啟防火墻和Apache

# service iptables restart

# service httpd restart

五、正常情況下,應(yīng)該可以通過新端口訪問WEB服務(wù)了。

注:

1、第二、三、四步驟是在系統(tǒng)已經(jīng)開啟SELinux和防火墻的情況下設(shè)置的,如果已經(jīng)關(guān)閉此兩個(gè)服務(wù),修改端口后直接重啟Apache即可;

2、修改的端口號(hào)可以是執(zhí)行#semanage port -l|grep http后,默認(rèn)已經(jīng)有的端口,如8443,這樣可以省略額外添加SELinux端口操作;

3、第三步操作可以圖形界面下完成。

參考資料

1、Permission denied: make_sock: could not bind to address

 http://emmune.blogspot.com/2009/07/permission-denied-makesock-could-not.html

不熟悉python、plone、zope,想用apache。80端口已經(jīng)不在,就征用81端口湊合吧。修改httpd.conf后apachectl start,結(jié)果:
(13)Permission denied: make_sock: could not bind to address [::]:81
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:81

查一下SELinux下http相關(guān)端口 semanage port -l|grep http,結(jié)果:
http_cache_port_t tcp 3128, 8080, 8118, 10001-10010
http_cache_port_t udp 3130
http_port_t tcp 80, 443, 488, 8008, 8009, 8443
pegasus_http_port_t tcp 5988
pegasus_https_port_t tcp 5989

直接用man semanage最后例子中的一句
# Allow Apache to listen on port 81
semanage port -a -t http_port_t -p tcp 81
然后再apachectl start,OK。使用域名:81能夠訪問啦。

注:semanage
semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. This includes the mapping from Linux usernames to SELinux user identities (which controls the initial security context assigned to Linux users when they login and bounds their authorized role set) as well as security context mappings for various kinds of objects, such as network ports, interfaces, and nodes(hosts) as well as the file context mapping. See the EXAMPLES section below for some examples of common usage. Note that the semanage login command deals with the mapping from Linux usernames (logins) to SELinux user identities, while the semanage user command deals with the mapping from SELinux user identities to authorized role sets. In most cases, only the former mapping needs to be adjusted by the administrator; the latter is principally defined by the base policy and usually does not require modification.

2、linux 下apche無法監(jiān)聽端口解決辦法

http://www.zzxj.net/blog/fxs_2008/archive/2010/07/05/187.html

想建立一個(gè)測(cè)試用的虛擬主機(jī),遇到了這個(gè)問題:
[root@localhost html]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.termwikidev for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:81
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:81
no listening sockets available, shutting down
Unable to open logs

解決辦法:

semanage port -l|grep http
semanage port -a -t http_port_t -p tcp 81

這個(gè)兩個(gè)命令一是查看,一個(gè)是添加,添加完再查看一遍,如果有81,則成功。另可能要以root用戶運(yùn)行。

此外,如果要外網(wǎng)訪問,還要打開linux的防火墻:

[root@localhost html]# vim /etc/sysconfig/iptables
[root@localhost html]# service iptables restart

重啟apache.

相關(guān)資料:

starting httpd 13 permission denied make_sock could not bind to address2010年01月19日 星期二 11:33In Fedora Core 5/6 and RHEL 5. We have made it easier to customize certain common parts of SELinux. In previous releases of SELinux if you wanted to change simple things like which port a daemon could listen to, you would need to write policy. Now we have the semanage utility.

SELinux assigns types to all network ports on a system. By default all ports are less then 1024 are labeled reserved_port_t and all ports > 1024 are labeled port_t. If a port is assigned to a particular type
say the http port 80, it has an assigned type of http_port_t. If you want to look at all the assigned ports in SELinux, you can use the semanage tool, semanage port -l.

So if you executed

semanage port -l | grep http
http_cache_port_t tcp 3128, 8080, 8118
http_cache_port_t udp 3130
http_port_t tcp 80, 443, 488, 8008, 8009, 8443
pegasus_http_port_t tcp 5988
pegasus_https_port_t tcp 5989

Here we see http_port_t is assigned to ports 80, 443, 488, 8008, 8009, 8443

The policy is written to allow httpd_t http_port_t:tcp_socket name_bind;

This means the apache command can "bind" to an port that is labeled http_port_t.

So lets say you want to run httpd on port 81.

So you edit /etc/httpd/http.conf

and change this line
Listen 80
to
Listen 81


Now restart the daemon.
service httpd restart
Stopping httpd: [ OK ]
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:81
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:81
no listening sockets available, shutting down
Unable to open logs
[FAILED]

Now the daemon fails to start because it can not bind to port 81.

This generates an AVC that looks like

----
time->Tue Dec 12 17:37:49 2006
type=SYSCALL msg=audit(1165963069.248:852): arch=40000003 syscall=102 success=no exit=-13 a0=2 a1=bf96a830 a2=b5b1e8 a3=9e58b68 items=0 ppid=21133 pid=21134 auid=3267 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts10 comm="httpd" exe="/usr/sbin/httpd" subj=user_u:system_r:httpd_t:s0 key=(null)
type=AVC msg=audit(1165963069.248:852): avc: denied { name_bind } for pid=21134 comm="httpd" src=81 scontext=user_u:system_r:httpd_t:s0 tcontext=system_u:object_r:reserved_port_t:s0 tclass=tcp_socket

To fix this you can use semanage to add the port

semanage port -a -t http_port_t -p tcp 81

service httpd start
Starting httpd: [ OK ]

posted on 2013-07-30 18:41 多彩人生 閱讀(2185) 評(píng)論(0)  編輯 收藏 引用 所屬分類: linux program

導(dǎo)航

統(tǒng)計(jì)

常用鏈接

留言簿(3)

隨筆分類

隨筆檔案

搜索

最新評(píng)論

閱讀排行榜

評(píng)論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久激情婷婷| 狠狠久久婷婷| 欧美一区高清| 久久精品盗摄| 久久精品中文字幕一区| 久久精品亚洲一区二区三区浴池| 日韩一级黄色av| 欧美在线免费播放| 久久一区国产| 国产精品免费观看在线| 好吊成人免视频| 夜夜嗨一区二区| 久久精品国产99| 亚洲东热激情| 亚洲伦理中文字幕| 午夜精品福利一区二区蜜股av| 午夜久久福利| 欧美日韩a区| 亚洲电影免费| 久久婷婷国产麻豆91天堂| 亚洲狼人综合| 欧美影院成年免费版| 欧美人成网站| 亚洲精品婷婷| 国产精品久久久久一区| 国产农村妇女毛片精品久久麻豆 | 久久激情中文| 欧美四级电影网站| 日韩午夜一区| 91久久国产综合久久91精品网站| 亚洲线精品一区二区三区八戒| 美女视频一区免费观看| 伊人成人开心激情综合网| 性久久久久久久久久久久| 一区二区精品在线| 欧美日韩在线播放一区二区| 一本色道久久综合狠狠躁篇怎么玩| 欧美成人精品在线观看| 另类尿喷潮videofree| 精品不卡在线| 亚洲黄色在线看| 欧美另类一区二区三区| 性欧美超级视频| 欧美在线在线| 日韩视频在线一区二区三区| 亚洲区免费影片| 国产精品久久久一区麻豆最新章节| 欧美一级理论性理论a| 久久久.com| 亚洲视频中文| 欧美一级二级三级蜜桃| 亚洲国产精品va在看黑人| 亚洲精品之草原avav久久| 国产精品视频一区二区三区| 国产啪精品视频| 欧美jizzhd精品欧美喷水| 欧美天天综合网| 欧美成人精品在线观看| 国产精品萝li| 亚洲伦伦在线| 亚洲精品国产精品国自产观看| 亚洲欧美激情精品一区二区| 亚洲国产影院| 久久日韩粉嫩一区二区三区| 欧美一区二区在线免费播放| 欧美经典一区二区三区| 模特精品裸拍一区| 黄色日韩精品| 欧美~级网站不卡| 免费看亚洲片| 在线成人激情| 老牛嫩草一区二区三区日本| 久久久夜精品| 黑人巨大精品欧美一区二区| 激情小说另类小说亚洲欧美| 久久www成人_看片免费不卡| 久久国产精品黑丝| 好看的亚洲午夜视频在线| 久久精品亚洲| 亚洲精品久久视频| 亚洲淫片在线视频| 亚洲第一区在线观看| 亚洲乱码国产乱码精品精| 欧美日韩一区不卡| 亚洲欧美成人一区二区三区| 欧美在线视频日韩| 亚洲国产精品成人va在线观看| 欧美成人午夜免费视在线看片| 亚洲精品免费在线播放| 久久久久久97三级| 一本大道久久a久久精二百| 国产精品一二三视频| 久久久亚洲高清| 亚洲图片欧美午夜| 亚洲欧洲一二三| 国产精品爽爽ⅴa在线观看| 久久久欧美精品sm网站| 一本久久综合亚洲鲁鲁五月天| 久久久久在线观看| 性色av一区二区三区| 亚洲三级电影在线观看| 在线观看日韩www视频免费 | 中文国产成人精品| 美女亚洲精品| 老司机67194精品线观看| 亚洲一区国产精品| 亚洲图片欧洲图片av| 亚洲国产一区在线| 亚洲高清激情| 亚洲美女视频在线免费观看| 麻豆精品一区二区综合av| 欧美一区二区精品| 亚洲综合色激情五月| 影音先锋日韩有码| 国产精品久久久久久久浪潮网站 | 亚洲天堂免费观看| 国产永久精品大片wwwapp| 欧美日韩三区| 免费亚洲电影在线观看| 久久国产精品久久久久久| 亚洲视频网在线直播| 亚洲久久成人| 99国产精品99久久久久久| 亚洲人屁股眼子交8| 亚洲精品少妇| 亚洲欧美国产不卡| 久久噜噜噜精品国产亚洲综合 | 亚洲国产高清一区| 亚洲人成网站在线观看播放| 亚洲日本中文| 宅男精品视频| 欧美主播一区二区三区美女 久久精品人| 亚洲精品在线观| 9色porny自拍视频一区二区| 在线看片第一页欧美| 136国产福利精品导航| 亚洲国产成人精品视频| 好吊妞**欧美| 亚洲人成艺术| 小嫩嫩精品导航| 免费不卡在线观看av| 99视频超级精品| 欧美一区二区三区久久精品| 美国成人直播| 国产精品美女久久久免费| 韩日视频一区| 久久精品人人爽| 亚洲字幕在线观看| 欧美区一区二| 亚洲网站在线| 亚洲免费中文| 国产一区日韩欧美| 蜜臀91精品一区二区三区| 久久精品青青大伊人av| 怡红院精品视频| 欧美激情第3页| 欧美人成在线视频| 亚洲免费影视第一页| 亚洲小说春色综合另类电影| 国产精品九九| 久久精品亚洲精品| 久久精品一区四区| 国产欧美日韩精品一区| 亚洲欧美日韩在线| 亚洲视频你懂的| 精品91在线| 亚洲人成在线观看| 在线视频你懂得一区| 国产精品美女久久久久久2018| 国产精品伊人日日| 亚洲欧美激情诱惑| 久久久99爱| 欧美一级精品大片| 欧美精品一线| 久久久精品午夜少妇| 免费观看30秒视频久久| 一本色道久久加勒比88综合| 欧美一区二区三区男人的天堂| 国产一区在线播放| 亚洲国产美女精品久久久久∴| 欧美激情在线观看| 欧美亚洲三级| 欧美成人国产| 久久久九九九九| 欧美日韩视频一区二区| 久久精品日产第一区二区| 欧美日韩另类在线| 美玉足脚交一区二区三区图片| 狂野欧美激情性xxxx欧美| 欧美一级久久久| 国产精品福利av| 在线亚洲自拍| 亚洲欧美高清| 国产美女高潮久久白浆| 亚洲专区免费| 亚洲深夜福利在线| 久久视频这里只有精品| 久久久久国产精品一区| 国产精品嫩草99av在线| 亚洲一区二区在线播放|