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

colorful

zc qq:1337220912

 

apache 開啟多站點


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端口號

一、修改/etc/httpd/conf/httpd.conf文件中的監聽端口號

Listen 80

把80修改成需要的號,如8000,即

Listen 8000
二、查看SELinux下http相關端口

# 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

發現8000不在其范圍之內,所以需要另外添加,方法如下:

# 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

五、正常情況下,應該可以通過新端口訪問WEB服務了。

注:

1、第二、三、四步驟是在系統已經開啟SELinux和防火墻的情況下設置的,如果已經關閉此兩個服務,修改端口后直接重啟Apache即可;

2、修改的端口號可以是執行#semanage port -l|grep http后,默認已經有的端口,如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端口已經不在,就征用81端口湊合吧。修改httpd.conf后apachectl start,結果:
(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相關端口 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

直接用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無法監聽端口解決辦法

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

想建立一個測試用的虛擬主機,遇到了這個問題:
[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

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

此外,如果要外網訪問,還要打開linux的防火墻:

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

重啟apache.

相關資料:

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) 評論(0)  編輯 收藏 引用 所屬分類: linux program

導航

統計

常用鏈接

留言簿(3)

隨筆分類

隨筆檔案

搜索

最新評論

閱讀排行榜

評論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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| 日韩午夜精品| 国产嫩草一区二区三区在线观看 | 免播放器亚洲一区| 亚洲啪啪91| 99国内精品| 国产日韩欧美在线| 欧美成人亚洲成人| 欧美日韩hd| 欧美在线免费| 美女精品国产| 亚洲男人天堂2024| 久久精品亚洲热| 亚洲精品乱码久久久久久| 亚洲免费观看在线观看| 国产欧美日韩激情| 亚洲成人在线视频播放| 欧美日韩一区二区三区免费| 欧美一区二区在线免费播放| 久久久五月婷婷| 亚洲色图综合久久| 久久久精品性| 亚洲免费一在线| 欧美wwwwww| 久久精品国产综合| 欧美日韩情趣电影| 欧美第十八页| 国产视频观看一区| 亚洲理论在线观看| 激情久久婷婷| 亚洲综合日韩在线| 日韩一级黄色大片| 久久精品国产久精国产思思| 亚洲一区二区三区精品视频| 久久全国免费视频| 久久av一区二区| 欧美日韩你懂的| 亚洲国产精品第一区二区| 国产精品一二三四| 亚洲人妖在线| 激情成人在线视频| 一区二区三区日韩欧美| 国产精品va在线播放我和闺蜜| 欧美成人一区在线| 国产精品视频一区二区高潮| 裸体女人亚洲精品一区| 欧美系列亚洲系列| 欧美激情国产日韩| 国产情人节一区| 亚洲精品一区久久久久久| 国产资源精品在线观看| 99精品福利视频| 最新国产の精品合集bt伙计| 亚洲国产精品久久人人爱蜜臀| 欧美午夜不卡视频| 免费亚洲电影在线| 国产午夜精品麻豆| 这里只有精品视频| 中日韩男男gay无套 | 久久er99精品| 欧美偷拍另类| 亚洲国产日韩一级| 在线观看国产精品淫| 一本色道久久综合狠狠躁篇怎么玩| 在线精品在线| 亚洲一区www| 中文在线不卡视频| 欧美系列亚洲系列| 99精品欧美一区二区三区| 亚洲精美视频| 嫩草成人www欧美| 老司机亚洲精品| 海角社区69精品视频| 亚洲在线免费视频| 亚洲精品你懂的| 欧美日韩精品一区二区三区| 美国三级日本三级久久99| 国产综合欧美在线看| 亚洲欧美亚洲| 久久成人一区二区| 国产一区二区久久精品| 亚洲欧美在线观看| 久久久久综合| 揄拍成人国产精品视频| 久久中文精品| 久久综合中文字幕| 亚洲美女尤物影院| 欧美视频二区36p| 一区二区三区偷拍| 欧美在线播放高清精品| 国产亚洲欧美激情| 久久人人97超碰精品888| 欧美成人精品福利| 99亚洲一区二区| 欧美午夜激情小视频| 老色批av在线精品| 在线欧美日韩国产| 久久影院午夜片一区| 亚洲欧洲在线一区| 亚洲视频一二| 国产亚洲欧美一区| 可以看av的网站久久看| 亚洲乱码视频| 久久se精品一区二区| 激情综合五月天| 欧美精品一二三| 亚洲精品影视在线观看| 久久一区激情| 在线视频欧美日韩精品| 国产精品久久久久久久久久久久久久| 亚洲一区二区三区在线看| 蜜桃av综合| 亚洲伊人观看| 亚洲国产高清视频| 国产精品一区免费视频| 免费看亚洲片| 午夜日韩电影| 亚洲美女视频在线观看| 欧美一区二区三区免费观看| 亚洲国产精品精华液2区45| 欧美三级不卡| 蜜臀va亚洲va欧美va天堂| 99精品热视频| 欧美激情在线狂野欧美精品| 性色av一区二区三区| 精品999网站| 国产精品草草| 欧美女同在线视频| 久久久久久久尹人综合网亚洲| 日韩亚洲欧美精品| 亚洲二区在线| 久久中文在线| 欧美在线www| 亚洲欧美日韩中文在线制服| 亚洲精品综合| 亚洲电影第1页| 国产自产精品| 国产精品视频最多的网站| 欧美片在线播放| 欧美chengren| 免费成人高清| 久久久久亚洲综合| 一片黄亚洲嫩模| 亚洲视频一起| 宅男噜噜噜66一区二区| 91久久综合亚洲鲁鲁五月天| 免费久久精品视频| 毛片基地黄久久久久久天堂| 欧美一区=区| 午夜在线视频观看日韩17c| 在线一区二区三区做爰视频网站 | 久久久久久久久久久久久9999| 亚洲女爱视频在线| 亚洲男同1069视频| 亚洲免费综合| 欧美影院在线| 午夜精品成人在线| 欧美一区观看| 久久久久久穴| 欧美片在线播放| 欧美日韩国产色视频| 欧美日韩一区综合| 欧美日韩综合不卡| 欧美性大战久久久久| 国产精品地址| 国产三区精品| 国产精品日韩久久久久| 好看不卡的中文字幕| 狠狠色丁香久久婷婷综合丁香| 国产小视频国产精品| 国产中文一区| 亚洲黄色片网站| 在线亚洲精品福利网址导航| 亚洲一区激情| 久久www成人_看片免费不卡| 欧美大片免费看| 99re热精品| 亚洲欧美一区在线| 久久综合久久综合久久| 欧美成人dvd在线视频| 欧美日本中文| 国产精品亚洲综合| 国产欧美不卡| 艳妇臀荡乳欲伦亚洲一区| 亚洲欧美久久久| 欧美freesex8一10精品| 日韩视频第一页| 欧美一区二区在线观看| 免费成人黄色片| 国产精品私拍pans大尺度在线| 黄色小说综合网站| 亚洲精品中文字幕有码专区| 久久九九99| 一本色道婷婷久久欧美| 久久精品国产99|