wampserver配置端口、虚拟主机;访问内网网站

 时间:2024-10-13 22:59:43

1、修改端口: 找到httpd.conf文件,搜索80端口,把80替换为你需要的端口8080(是80的都改)

2、配置VirtualHost虚拟主机 : 1、 找到apache的httpd.conf文件 画陲奴颁注释掉下面代码,这些是wamp自己搭建的站点#DocumentRoot "$撑俯擂摔{INSTALL_DIR}/www"#<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#</Directory> 2、找到httpd-vhosts.conf文件,修改端口、域名、网站指向的地址,如下<VirtualHost *:8080> ServerName admin.wz.com ServerAlias admin.wz.com DocumentRoot "${INSTALL_DIR}/www/wz" <Directory "${INSTALL_DIR}/www/wz/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory></VirtualHost> 3、修改host文件:127.0.0.1 admin.wz.com 4、访问:admin.wz.com:8080 记得带上端口

3、如果是部署到服务器,其他机子需要访问在上面1到2步骤后还需要修改两个地方,不然ping通了主机,也访问不了网站 1、修改httpd.conf,如下<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Allow from all</Directory> 2、修改httpd-vhosts.conf,如下<Directory "${INSTALL_DIR}/www/wz/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Order deny,allow Allow from all </Directory>

  • PHP:入门——WAMPServer自拟定端口(端口冲突
  • wampserver怎么改端口
  • WampServer实现手机访问 移动端开发
  • wampserver多站点配置
  • 热门搜索
    关于清明节手抄报图片 关于数学的手抄报内容 学科学爱科学手抄报 二年级安全手抄报 我的一本课外书手抄报 安全法制手抄报 读书手抄报的资料 六年级手抄报大全 手抄报花边图片大全 格列佛游记手抄报