Windows 下apache配置外網可訪問
阿新 • • 發佈:2018-12-08
1.配置apache的httpd.conf
<Directory "${INSTALL_DIR}/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 +Multiviews # # 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. # # -- onlineoffline tag - don't remove # 將Require local 改變為 Require all granted # Require local -- Require all granted </Directory>
將Require local 改變為 Require all granted
2.配置apache的httpd-vhosts.conf
# Virtual Hosts # <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot "${INSTALL_DIR}/www" <Directory "${INSTALL_DIR}/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost>
將Require local 改變為 Require all granted