老熟女激烈的高潮_日韩一级黄色录像_亚洲1区2区3区视频_精品少妇一区二区三区在线播放_国产欧美日产久久_午夜福利精品导航凹凸

重慶分公司,新征程啟航

為企業(yè)提供網(wǎng)站建設(shè)、域名注冊、服務(wù)器等服務(wù)

如何查看linux下apache配置文件

這篇文章主要介紹如何查看linux下apache配置文件,文中介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們一定要看完!

從策劃到設(shè)計制作,每一步都追求做到細(xì)膩,制作可持續(xù)發(fā)展的企業(yè)網(wǎng)站。為客戶提供成都網(wǎng)站設(shè)計、成都網(wǎng)站制作、外貿(mào)網(wǎng)站建設(shè)、網(wǎng)站策劃、網(wǎng)頁設(shè)計、主機(jī)域名、網(wǎng)頁空間、網(wǎng)絡(luò)營銷、VI設(shè)計、 網(wǎng)站改版、漏洞修補(bǔ)等服務(wù)。為客戶提供更好的一站式互聯(lián)網(wǎng)解決方案,以客戶的口碑塑造優(yōu)易品牌,攜手廣大客戶,共同發(fā)展進(jìn)步。

Linux下Apache的配置文件是 /etc/apache2/apache2.conf,Apache在啟動時會自動讀取這個文件的配置信息。而其他的一些配置文件,如 httpd.conf等,則是通過Include指令包含進(jìn)來。

在apache2.conf里有sites-enabled目錄,而在 /etc/apache2下還有一個sites-available目錄,其實(shí),這里面才是真正的配置文件,而sites- enabled目錄存放的只是一些指向這里的文件的符號鏈接,你可以用ls /etc/apache2/sites-enabled/來證實(shí)一下。

所以,如果apache上配置了多個虛擬主機(jī),每個虛擬主機(jī)的配置文件都放在 sites-available下,那么對于虛擬主機(jī)的停用、啟用就非常方便了:當(dāng)在sites-enabled下建立一個指向某個虛擬主機(jī)配置文件的鏈 接時,就啟用了它;如果要關(guān)閉某個虛擬主機(jī)的話,只需刪除相應(yīng)的鏈接即可,根本不用去改配置文件。

sudo cp /etc/apache2/sites-avaliable/000-default.conf , 命名為 test.conf

2.修改配置文件:test.conf


# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName www.test.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/test/
ErrorLog /var/www/html/test/error.log
CustomLog /var/www/html/test/access.log combined

    Options FollowSymLinks
    DirectoryIndex index.php index.html index.htm
    AllowOverride All #注意這個地方的配置,會影響本地目錄下的.htaccess的啟用
    Order deny,allow
    Allow from All

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf

建立鏈接文件:

sudo ln -s /etc/apache2/sites-available/test.conf /etc/apache2/sites-enabled/test.conf

或者: sudo a2ensite test.conf

4.重啟apache 服務(wù)器

sudo /etc/init.d/apache2 restart

修改hosts(/etc/hosts)

// 增加一行
127.0.0.1 www.test.com

到這里基本就可正常訪問了!

附:如果這里還需要對目錄級的URL重寫支持,繼續(xù)往下:

終端運(yùn)行

sudo a2enmod

程序提示可供激活的模塊名稱,輸入:rewrite

成功會提示

rewrite already load

修改/etc/apache2/sites-enabled/test.conf (該鏈接指向的是站點(diǎn)配置文件)

把下的AllowOverride 屬性改為All,保存。(上面我們已經(jīng)配置為 All)

重新加載apache

sudo /etc/init.d/apache2 restart

以上是如何查看linux下apache配置文件的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!


當(dāng)前名稱:如何查看linux下apache配置文件
標(biāo)題來源:http://www.xueling.net.cn/article/pipdso.html

其他資訊

在線咨詢
服務(wù)熱線
服務(wù)熱線:028-86922220
TOP
主站蜘蛛池模板: 亚洲色一区二区三区四区 | 韩国一大片a毛片 | 91这里只有精品 | 新japanesehdxxxx乱 | 成人涩涩涩视频在线观看 | 欧美激情一区二区三区在线 | 久久天天东北熟女毛茸茸 | 久久躁躁天天添久久久 | 黄色大片免费看 | 老熟女毛茸茸 | 超碰人人爽 | 中国av一区二区三区 | 成人福利视频在线观看 | 国产乱人对白A片麻豆 | 香蕉啪视频在线观看视频久 | 国产亚洲va综合人人澡精品 | 日本久久久久久久做爰片日本 | 99热这里只有精品8 久久国产激情视频 | 99精品热| 国产精品久久久久久久娇妻 | 伊人狠狠色丁香婷婷综合动态图 | 91国产在线视频在线观看 | 嫩草导航 | 午夜三级理论在线观看 | 久草视频在线资源 | 日本特黄a级片 | 99久久国产综合精品女乱人伦 | 久久久女人与动物群交毛片 | 色站在线 | 精品国产一区二区三区高潮视 | 免费视频专区一国产盗摄 | 国产一二三区在线视频 | 亚洲色大成网站www 久久久久91 | 98精品久久久久久久 | 午夜a级毛片免费观看 | 亚洲精品高潮 | 综合91 | 全部免费特黄特色大片看片 | gay男生露j打飞j视频网站 | 成人综合婷婷国产精品久久蜜臀 | 永久91嫩草亚洲精品人人 |