WAMP
在 httpd.conf 這個檔案內,底下的這個部分
<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:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
# Require all granted
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from ::1
Allow from localhost
</Directory>
底下末端的地方,可以加上這個部分,設定那些可以連,那些不能連。
Order Deny,Allow
Deny from all
Allow from ::1
Allow from localhost
然後在檔案最底下設定你要對外開放的連線。
Alias /sample E:/gitLab/sample/
<Directory "E:/gitLab/sample/">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
/sample 代表外部連到你的電腦後的捷徑,網址可能會長這樣
http://XXX.XXX.XXX.XXX/sample
E:/gitLab/sample/ 代表在你電腦上,你要開放外部連線的資料夾路徑
Last updated