apache中偽靜態(tài)配置和使用(Apache虛擬主機(jī)下Discuz偽靜態(tài))
更新時(shí)間:2012年01月03日 12:09:36 作者:
apache中偽靜態(tài)配置和使用(Apache虛擬主機(jī)下Discuz偽靜態(tài)),需要的朋友可以參考下。
一 打開 Apache 的配置文件 httpd.conf 。
二 將#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
三 在 httpd.conf中添加:
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{ENV:SCRIPT_URL} (?:index|dispbbs)[-0-9]+\.html
RewriteRule ^(.*?(?:index|dispbbs))-([-0-9]+)\.html$ $1.php?__is_apache_rewrite=1&__rewrite_arg=$2
</IfModule>
四 要實(shí)現(xiàn)asp帖子URL到php帖子的映射,在 第三步的<IfModule mod_rewrite.c>和</IfModule>之間添加:
RewriteMap tolowercase int:tolower
RewriteCond %{QUERY_STRING} (?:boardid|page|id|replyid|star|skin)\=\d+ [NC]
RewriteRule ^(.*(?:index|dispbbs))\.asp$ $1.php?${tolowercase:%{QUERY_STRING}}&__is_apache_rewrite=1
五 保存httpd.conf并重啟Apache。
六、mod_rewrite 簡(jiǎn)介
Rewirte主要的功能就是實(shí)現(xiàn)URL的跳轉(zhuǎn)和隱藏真實(shí)地址,基于Perl語(yǔ)言的正則表達(dá)式規(guī)范。平時(shí)幫助我們實(shí)現(xiàn)偽靜態(tài),擬目錄,域名跳轉(zhuǎn),防止盜鏈等等
七、mod_rewrite 規(guī)則的使用
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.php100.com [NC]
RewriteRule ^/(.*) http://www.php100.com/ [L]
--------
RewriteEngine on
RewriteRule ^/test([0-9]*).html$ /test.php?id=$1
RewriteRule ^/new([0-9]*)/$ /new.php?id=$1 [R]
八、mod_rewrite 規(guī)則修正符
1) R 強(qiáng)制外部重定向
2) F 禁用URL,返回403HTTP狀態(tài)碼。
3) G 強(qiáng)制URL為GONE,返回410HTTP狀態(tài)碼。
4) P 強(qiáng)制使用代理轉(zhuǎn)發(fā)。
5) L 表明當(dāng)前規(guī)則是最后一條規(guī)則,停止分析以后規(guī)則的重寫。
6) N 重新從第一條規(guī)則開始運(yùn)行重寫過(guò)程。
7) C 與下一條規(guī)則關(guān)聯(lián)8) T=MIME-type(force MIME type) 強(qiáng)制MIME類型
9) NS 只用于不是內(nèi)部子請(qǐng)求
10) NC 不區(qū)分大小寫
11) QSA 追加請(qǐng)求字符串
12) NE 不在輸出轉(zhuǎn)義特殊字符 \%3d$1 等價(jià)于 =$1
Apache虛擬主機(jī)下使用Rewrite實(shí)現(xiàn)Discuz偽靜態(tài)的配置
第一步 :當(dāng)然是配置Apache支持Rewrite功能,這個(gè)不多說(shuō)了,就是:
LoadModule rewrite_module modules/mod_rewrite.so
原來(lái)有注釋的就去掉注釋,原來(lái)沒有的添加上。
上面的配置中:
1.Options FollowSymLinks 這一步的配置必須有。
2.AllowOverride all 原來(lái)None的要改成all。
這兩個(gè)配置缺一不可。
第三步 ,大家就比較熟悉了也不多說(shuō)了,
就是在對(duì)應(yīng)的目錄下面添加.htaccess文件,下面以discuz為例說(shuō)明:
RewriteEngine On
RewriteBase /
RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
第四步 :配置Discuz使用偽靜態(tài):
登錄后臺(tái)管理,進(jìn)入“全局”=》“優(yōu)化配置”=》“搜索引擎優(yōu)化”在原來(lái)URL靜態(tài)化的地方選中,然后提交即可。
配置完畢,去discuz前臺(tái)訪問(wèn)就可以了。原來(lái)的php都變成html了。

在apache配置文件中設(shè)置
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
RewriteRule ^/home/(space|network)-(.+)\.html$ /home/$1\.php\?rewrite=$2
RewriteRule ^/home/(space|network)\.html$ /home/$1\.php
RewriteRule ^/home/([0-9]+)$ /home/space\.php\?uid=$1
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
</IfModule>
此文適用于Apache虛擬主機(jī)用戶。
在開始以下設(shè)置之前,首先應(yīng)該確認(rèn)服務(wù)器支持mod_rewrite以及支持對(duì)站點(diǎn)目錄中.htaccess的文件解析,否則即便按照下面的方法設(shè)置好了,也無(wú)法使用。點(diǎn)擊查看Apache下開啟mod_rewrite的方法。
Apache下開啟mod_rewrite
服務(wù)器環(huán)境:Windows Server 2003 SP2 + Apache 2.0.59
開啟方法:
用文本編輯器打開Apache安裝目錄\conf\httpd.conf,找到“#LoadModule rewrite_module modules/mod_rewrite.so”這行,去掉前面的“#”;繼續(xù)查找“AllowOverride None”,修改為“AllowOverride All”;然后,重啟Apache即可。
檢查論壇所在目錄中是否存在.htaccess 文件,如果不存在,則手工建立此文件。在Win32系統(tǒng)下,無(wú)法直接建立.htaccess 文件,則可以從其他系統(tǒng)中拷貝一份,也可以點(diǎn)擊這里下載我做的一個(gè),解壓縮后即可使用。編輯并修改.htaccess文件,添加以下內(nèi)容 :
# 將 RewriteEngine 模式打開
RewriteEngine On
# 修改以下語(yǔ)句中的 /discuz 為你的論壇目錄地址,如果程序放在根目錄中,請(qǐng)將 /discuz 修改為 /
RewriteBase /discuz
# Rewrite 系統(tǒng)規(guī)則請(qǐng)勿修改
RewriteRule ^archiver/([a-z0-9\-]+\.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
RewriteRule ^profile-(username|uid)-(.+)\.html$ viewpro.php?$1=$2
添加內(nèi)容時(shí),請(qǐng)遵照上面的提示,修改論壇所在的路徑,然后保存。將.htaccess文件上傳到論壇所在的目錄中。進(jìn)入論壇系統(tǒng)設(shè)置,根據(jù)需要開啟URL靜態(tài)化功能。
-=======================================================
注意下面必須得
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@domain.com
DocumentRoot "E:\aaa\wwwroot"
ServerName *
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/([a-z0-9-]+.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3
RewriteRule ^(.*)/profile-(username|uid)-(.+).html$ $1/viewpro.php?$2=$3
RewriteRule ^ss-xs/([0-9]+)/spacelist(.*)$ /index.php?$1/action_spacelist$2
RewriteRule ^ss-xs/([0-9]+)/viewspace_(.+)$ /index.php?$1/action_viewspace_itemid_$2
RewriteRule ^ss-xs/([0-9]+)/viewbbs_(.+)$ /index.php?$1/action_viewbbs_tid_$2
RewriteRule ^ss-xs/([0-9]+)/(.*)$ /index.php?$1/$2
RewriteRule ^ss-xs/([0-9]+)$ /index.php?$1
RewriteRule ^ss-xs/action_(.+)$ /index.php?action_$1
RewriteRule ^ss-xs/category_(.+)$ /index.php?action_category_catid_$1
RewriteRule ^ss-xs/itemlist_(.+)$ /index.php?action_itemlist_catid_$1
RewriteRule ^ss-xs/viewnews_(.+)$ /index.php?action_viewnews_itemid_$1
RewriteRule ^ss-xs/viewthread_(.+)$ /index.php?action_viewthread_tid_$1
RewriteRule ^ss-xs/index([.a-zA-Z0-9]*)$ /index.php
</IfModule>
</VirtualHost>
=======================
NameVirtualHost 124.129.183.146
<VirtualHost bbs.jb51.net>
ServerName bbs.jb51.net
DocumentRoot D:/WebSite/phpbbs
<Directory "D:/WebSite/phpbbs">
Options Indexes FollowSymLinks Includes
AllowOverride All
order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/([a-z0-9-]+.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3
RewriteRule ^(.*)/profile-(username|uid)-(.+).html$ $1/viewpro.php?$2=$3
RewriteRule ^ss-xs/([0-9]+)/spacelist(.*)$ /index.php?$1/action_spacelist$2
RewriteRule ^ss-xs/([0-9]+)/viewspace_(.+)$ /index.php?$1/action_viewspace_itemid_$2
RewriteRule ^ss-xs/([0-9]+)/viewbbs_(.+)$ /index.php?$1/action_viewbbs_tid_$2
RewriteRule ^ss-xs/([0-9]+)/(.*)$ /index.php?$1/$2
RewriteRule ^ss-xs/([0-9]+)$ /index.php?$1
RewriteRule ^ss-xs/action_(.+)$ /index.php?action_$1
RewriteRule ^ss-xs/category_(.+)$ /index.php?action_category_catid_$1
RewriteRule ^ss-xs/itemlist_(.+)$ /index.php?action_itemlist_catid_$1
RewriteRule ^ss-xs/viewnews_(.+)$ /index.php?action_viewnews_itemid_$1
RewriteRule ^ss-xs/viewthread_(.+)$ /index.php?action_viewthread_tid_$1
RewriteRule ^ss-xs/index([.a-zA-Z0-9]*)$ /index.php
</IfModule>
</VirtualHost>
二 將#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
三 在 httpd.conf中添加:
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{ENV:SCRIPT_URL} (?:index|dispbbs)[-0-9]+\.html
RewriteRule ^(.*?(?:index|dispbbs))-([-0-9]+)\.html$ $1.php?__is_apache_rewrite=1&__rewrite_arg=$2
</IfModule>
四 要實(shí)現(xiàn)asp帖子URL到php帖子的映射,在 第三步的<IfModule mod_rewrite.c>和</IfModule>之間添加:
RewriteMap tolowercase int:tolower
RewriteCond %{QUERY_STRING} (?:boardid|page|id|replyid|star|skin)\=\d+ [NC]
RewriteRule ^(.*(?:index|dispbbs))\.asp$ $1.php?${tolowercase:%{QUERY_STRING}}&__is_apache_rewrite=1
五 保存httpd.conf并重啟Apache。
六、mod_rewrite 簡(jiǎn)介
Rewirte主要的功能就是實(shí)現(xiàn)URL的跳轉(zhuǎn)和隱藏真實(shí)地址,基于Perl語(yǔ)言的正則表達(dá)式規(guī)范。平時(shí)幫助我們實(shí)現(xiàn)偽靜態(tài),擬目錄,域名跳轉(zhuǎn),防止盜鏈等等
七、mod_rewrite 規(guī)則的使用
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.php100.com [NC]
RewriteRule ^/(.*) http://www.php100.com/ [L]
--------
RewriteEngine on
RewriteRule ^/test([0-9]*).html$ /test.php?id=$1
RewriteRule ^/new([0-9]*)/$ /new.php?id=$1 [R]
八、mod_rewrite 規(guī)則修正符
1) R 強(qiáng)制外部重定向
2) F 禁用URL,返回403HTTP狀態(tài)碼。
3) G 強(qiáng)制URL為GONE,返回410HTTP狀態(tài)碼。
4) P 強(qiáng)制使用代理轉(zhuǎn)發(fā)。
5) L 表明當(dāng)前規(guī)則是最后一條規(guī)則,停止分析以后規(guī)則的重寫。
6) N 重新從第一條規(guī)則開始運(yùn)行重寫過(guò)程。
7) C 與下一條規(guī)則關(guān)聯(lián)8) T=MIME-type(force MIME type) 強(qiáng)制MIME類型
9) NS 只用于不是內(nèi)部子請(qǐng)求
10) NC 不區(qū)分大小寫
11) QSA 追加請(qǐng)求字符串
12) NE 不在輸出轉(zhuǎn)義特殊字符 \%3d$1 等價(jià)于 =$1
Apache虛擬主機(jī)下使用Rewrite實(shí)現(xiàn)Discuz偽靜態(tài)的配置
第一步 :當(dāng)然是配置Apache支持Rewrite功能,這個(gè)不多說(shuō)了,就是:
LoadModule rewrite_module modules/mod_rewrite.so
原來(lái)有注釋的就去掉注釋,原來(lái)沒有的添加上。
上面的配置中:
1.Options FollowSymLinks 這一步的配置必須有。
2.AllowOverride all 原來(lái)None的要改成all。
這兩個(gè)配置缺一不可。
第三步 ,大家就比較熟悉了也不多說(shuō)了,
就是在對(duì)應(yīng)的目錄下面添加.htaccess文件,下面以discuz為例說(shuō)明:
RewriteEngine On
RewriteBase /
RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
第四步 :配置Discuz使用偽靜態(tài):
登錄后臺(tái)管理,進(jìn)入“全局”=》“優(yōu)化配置”=》“搜索引擎優(yōu)化”在原來(lái)URL靜態(tài)化的地方選中,然后提交即可。
配置完畢,去discuz前臺(tái)訪問(wèn)就可以了。原來(lái)的php都變成html了。

在apache配置文件中設(shè)置
復(fù)制代碼 代碼如下:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
RewriteRule ^/home/(space|network)-(.+)\.html$ /home/$1\.php\?rewrite=$2
RewriteRule ^/home/(space|network)\.html$ /home/$1\.php
RewriteRule ^/home/([0-9]+)$ /home/space\.php\?uid=$1
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
</IfModule>
此文適用于Apache虛擬主機(jī)用戶。
在開始以下設(shè)置之前,首先應(yīng)該確認(rèn)服務(wù)器支持mod_rewrite以及支持對(duì)站點(diǎn)目錄中.htaccess的文件解析,否則即便按照下面的方法設(shè)置好了,也無(wú)法使用。點(diǎn)擊查看Apache下開啟mod_rewrite的方法。
Apache下開啟mod_rewrite
服務(wù)器環(huán)境:Windows Server 2003 SP2 + Apache 2.0.59
開啟方法:
用文本編輯器打開Apache安裝目錄\conf\httpd.conf,找到“#LoadModule rewrite_module modules/mod_rewrite.so”這行,去掉前面的“#”;繼續(xù)查找“AllowOverride None”,修改為“AllowOverride All”;然后,重啟Apache即可。
檢查論壇所在目錄中是否存在.htaccess 文件,如果不存在,則手工建立此文件。在Win32系統(tǒng)下,無(wú)法直接建立.htaccess 文件,則可以從其他系統(tǒng)中拷貝一份,也可以點(diǎn)擊這里下載我做的一個(gè),解壓縮后即可使用。編輯并修改.htaccess文件,添加以下內(nèi)容 :
復(fù)制代碼 代碼如下:
# 將 RewriteEngine 模式打開
RewriteEngine On
# 修改以下語(yǔ)句中的 /discuz 為你的論壇目錄地址,如果程序放在根目錄中,請(qǐng)將 /discuz 修改為 /
RewriteBase /discuz
# Rewrite 系統(tǒng)規(guī)則請(qǐng)勿修改
RewriteRule ^archiver/([a-z0-9\-]+\.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
RewriteRule ^profile-(username|uid)-(.+)\.html$ viewpro.php?$1=$2
添加內(nèi)容時(shí),請(qǐng)遵照上面的提示,修改論壇所在的路徑,然后保存。將.htaccess文件上傳到論壇所在的目錄中。進(jìn)入論壇系統(tǒng)設(shè)置,根據(jù)需要開啟URL靜態(tài)化功能。
-=======================================================
注意下面必須得
復(fù)制代碼 代碼如下:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@domain.com
DocumentRoot "E:\aaa\wwwroot"
ServerName *
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/([a-z0-9-]+.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3
RewriteRule ^(.*)/profile-(username|uid)-(.+).html$ $1/viewpro.php?$2=$3
RewriteRule ^ss-xs/([0-9]+)/spacelist(.*)$ /index.php?$1/action_spacelist$2
RewriteRule ^ss-xs/([0-9]+)/viewspace_(.+)$ /index.php?$1/action_viewspace_itemid_$2
RewriteRule ^ss-xs/([0-9]+)/viewbbs_(.+)$ /index.php?$1/action_viewbbs_tid_$2
RewriteRule ^ss-xs/([0-9]+)/(.*)$ /index.php?$1/$2
RewriteRule ^ss-xs/([0-9]+)$ /index.php?$1
RewriteRule ^ss-xs/action_(.+)$ /index.php?action_$1
RewriteRule ^ss-xs/category_(.+)$ /index.php?action_category_catid_$1
RewriteRule ^ss-xs/itemlist_(.+)$ /index.php?action_itemlist_catid_$1
RewriteRule ^ss-xs/viewnews_(.+)$ /index.php?action_viewnews_itemid_$1
RewriteRule ^ss-xs/viewthread_(.+)$ /index.php?action_viewthread_tid_$1
RewriteRule ^ss-xs/index([.a-zA-Z0-9]*)$ /index.php
</IfModule>
</VirtualHost>
=======================
復(fù)制代碼 代碼如下:
NameVirtualHost 124.129.183.146
<VirtualHost bbs.jb51.net>
ServerName bbs.jb51.net
DocumentRoot D:/WebSite/phpbbs
<Directory "D:/WebSite/phpbbs">
Options Indexes FollowSymLinks Includes
AllowOverride All
order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/([a-z0-9-]+.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3
RewriteRule ^(.*)/profile-(username|uid)-(.+).html$ $1/viewpro.php?$2=$3
RewriteRule ^ss-xs/([0-9]+)/spacelist(.*)$ /index.php?$1/action_spacelist$2
RewriteRule ^ss-xs/([0-9]+)/viewspace_(.+)$ /index.php?$1/action_viewspace_itemid_$2
RewriteRule ^ss-xs/([0-9]+)/viewbbs_(.+)$ /index.php?$1/action_viewbbs_tid_$2
RewriteRule ^ss-xs/([0-9]+)/(.*)$ /index.php?$1/$2
RewriteRule ^ss-xs/([0-9]+)$ /index.php?$1
RewriteRule ^ss-xs/action_(.+)$ /index.php?action_$1
RewriteRule ^ss-xs/category_(.+)$ /index.php?action_category_catid_$1
RewriteRule ^ss-xs/itemlist_(.+)$ /index.php?action_itemlist_catid_$1
RewriteRule ^ss-xs/viewnews_(.+)$ /index.php?action_viewnews_itemid_$1
RewriteRule ^ss-xs/viewthread_(.+)$ /index.php?action_viewthread_tid_$1
RewriteRule ^ss-xs/index([.a-zA-Z0-9]*)$ /index.php
</IfModule>
</VirtualHost>
您可能感興趣的文章:
- Apache 虛擬目錄和默認(rèn)首頁(yè)的設(shè)置
- 如何配置apache虛擬主機(jī)的實(shí)例小結(jié)
- 本地機(jī)apache配置基于域名的虛擬主機(jī)詳解
- Apache 添加虛擬目錄注意事項(xiàng)
- windows apache多端口虛擬主機(jī)配置方法
- apache虛擬主機(jī)中設(shè)置泛域名解析的方法
- apache虛擬機(jī)配置步驟和修改訪問(wèn)端口的方法(虛擬機(jī)端口映射)
- Apache 配置多端口 多虛擬主機(jī) 局域網(wǎng)訪問(wèn)示例
- Apache 多站點(diǎn)虛擬主機(jī)配置方法
- win10 apache配置虛擬主機(jī)后localhost無(wú)法使用的解決方法
相關(guān)文章
Ubuntu系統(tǒng)網(wǎng)絡(luò)故障排查的方法
最近在使用Ubuntu系統(tǒng)的時(shí)候碰到一個(gè)問(wèn)題,連接無(wú)線網(wǎng)絡(luò)的時(shí)候,發(fā)現(xiàn)右上角網(wǎng)絡(luò)設(shè)置中沒有 Enable Wi-Fi 這個(gè)選項(xiàng)了,所以通過(guò)一步步排查,終于找了解決辦法,現(xiàn)在分享給大家,有需要的朋友們可以參考借鑒。2016-10-10
CentOS 5.5使用yum來(lái)安裝LAMP(php運(yùn)行環(huán)境)
今天用yum方法搭建起了個(gè)LAMP環(huán)境,中間遇到了很多問(wèn)題,經(jīng)過(guò)google和各位前輩的幫助,終于將環(huán)境搭建起來(lái),現(xiàn)在把完整的步驟記錄下來(lái),2010-09-09
Ubuntu設(shè)置靜態(tài)IP地址的方法步驟(親測(cè)有效)
在某些場(chǎng)景下,我們可能需要將一臺(tái)電腦的IP地址設(shè)置成靜態(tài)的,例如在局域網(wǎng)內(nèi)部署一個(gè)服務(wù)器,我們可能不希望他通過(guò)DHCP獲取動(dòng)態(tài)地址,而造成無(wú)法訪問(wèn),設(shè)置靜態(tài)IP在window系統(tǒng)下比較容易,但在Linux系統(tǒng)下稍微麻煩一點(diǎn),本文給大家介紹了Ubuntu設(shè)置靜態(tài)IP地址的方法步驟2024-10-10
在Unix/Linux上使用通用二進(jìn)制文件安裝MySQL方式
本文介紹了如何在Unix/Linux平臺(tái)上從壓縮的tar文件二進(jìn)制發(fā)行版安裝MySQL,首先,需要下載并解壓縮發(fā)行版,然后創(chuàng)建一個(gè)符號(hào)鏈接并將其添加到PATH變量中,接下來(lái),設(shè)置發(fā)行版的所有權(quán)和訪問(wèn)權(quán)限,初始化數(shù)據(jù)目錄,啟動(dòng)MySQL服務(wù)器,并設(shè)置配置文件2025-02-02

