2013-04-30 104 views
-6

你好朋友, 我用這個鏈接[http://myipaddress/www.abc.com]給我的朋友 在互聯網上顯示我的網站在這裏,我使用我的寬帶連接,但現在我購買一個路由器,我 通過它 現在連接我的互聯網時,我給出相同的鏈接。他們能不能夠訪問我的website..need幫助的人。如何使htdocs文件夾可通過互聯網訪問

預先感謝您

回答

0

您需要portforward Apache的端口(通常是80,除非指定不同的

使用:http://www.portforward.com

信息如何與路由器portforward


訪問你的路由器設置?如果你不知道:

  1. 打開命令舞會PT
  2. 問題IPCONFIG

你應該呈現:

Ethernet adapter Local Area Connection: 

    Connection-specific DNS Suffix . : 
    Link-local IPv6 Address . . . . . : fe80::d168:1665:65c:7c2e%12 
    IPv4 Address. . . . . . . . . . . : 192.168.0.2 
    Subnet Mask . . . . . . . . . . . : 255.255.255.0 
    Default Gateway . . . . . . . . . : 192.168.0.1 

或東西看起來是這樣的。

  1. 鍵入您的默認網關到您的地址欄
0

您需要轉發「80」端口(或所使用的HTTP服務器的端口),在本地計算機服務它。

0

就像Maresh說你需要的,如果您使用的是在你的路由器轉發HTTP端口(80)向被服務的網站,並在計算機apache編輯httpd.conf文件。

這就是我的樣子,我只允許在本地網絡上的用戶

DocumentRoot "c:/wamp/www/" 
<Directory "c:/wamp/www/"> 
# 
# Possible values for the Options directive are "None", "All", 
# or any combination of: 
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 
# 
# Note that "MultiViews" must be named *explicitly* --- "Options All" 
# doesn't give it to you. 
# 
# The Options directive is both complicated and important. Please see 
# http://httpd.apache.org/docs/2.4/mod/core.html#options 
# for more information. 
# 
Options Indexes FollowSymLinks 

# 
# AllowOverride controls what directives may be placed in .htaccess files. 
# It can be "All", "None", or any combination of the keywords: 
# Options FileInfo AuthConfig Limit 
# 
AllowOverride All 

# 
# Controls who can get stuff from this server. 
# 
# Online --> Require all granted 

# onlineoffline tag - don't remove 

Require local 
#Require all granted 

</Directory> 

爲了讓廣域網,從刪除#「#Require所有授權」,並把它的盈「要求本地'。

上面的代碼只能從httpd.conf文件的一部分,但就是這樣,你會想編輯的部分中,搜索「需要當地的」在編輯器中找到它。