项目链接在 Wamp Server 上不起作用 [英] Project Links do not work on Wamp Server

查看:40
本文介绍了项目链接在 Wamp Server 上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在另一台计算机上安装 Wamp 服务器以运行中型数据库和 UI.我已成功阻止 IIS 并将服务器路由到 Localhost:8080.但是每当我尝试从本地主机主页访问我的项目时,在 www 文件中;我被重定向到未找到页面错误.

当我将鼠标悬停在链接上方时,目录总是出现http://ProjectFolderNameHere/".当它应该是http://LocalHost:8080/ProjectFolderNameHere/"时.我该怎么做才能使链接正常工作?

我的机器在 Windows 7 Home Edition 64 位上运行,并且我已经禁用了 Microsoft 的 IIS.

解决方案

如何在 WampServer 中创建虚拟主机


WAMPServer 3 让这个过程变得更加容易!

您几乎可以通过作为 WAMPServer 一部分提供的实用程序执行所有操作.

  • 在其中创建一个文件夹以包含您的 project.site.这可以在 C:wampwww 目录下或在一个完全独立的文件夹中,例如 C:websites.

  • 在您选择的位置 EG C:websitesproject1wwwc:wampwwwproject1www

  • 现在打开 localhost wampmanager->localhost 并点击主页上 TOOLS 部分下的链接 Add a Virtual Host.

你会看到这样的页面:

  • 按照每个字段上方的说明填写字段

  • 将为您创建虚拟主机配置.

  • 现在您必须重新启动 DNS 缓存.您可以从 wampmanager 菜单中执行此操作,例如 右键单击 wampmanager->Tools->Restart DNS.DNS 缓存将重新启动,然后 Apache 也将停止并重新启动.当 wampmanager 图标再次变为绿色时,一切都已完成.

  • 现在您必须创建一个简单的 index.php 文件或将您的站点安装到您在上面创建的文件夹中.

  • 假设您的 VH 名为 project.dev,您应该会在 WAMPServer 主页的 Your Virtual Hosts 部分看到该名称.

  • 您可以从此菜单启动站点,或者只使用地址栏中的新域名 EG project1.dev 并启动站点.


旧的 WAMPServer 2.5 机制,或者如果您想手动完成所有操作

WampServer 2.5 及更高版本的概念发生了变化,这种变化有充分的理由!

在 WampServer 中,现在强烈建议为您的每个项目创建一个虚拟主机,即使您将它们保存在 wampwwwsubfolder 结构中.

虚拟主机文档

虚拟主机示例

WampServer 主页 ( wampwwwindex.php ) 现在要求您为所有项目创建一个虚拟主机,因此只有这样做才能正常工作.p>

历史

为了让使用 WampServer 的初学者更轻松地学习 PHP Apache 和 MySQL,建议您在 wampwww 文件夹下创建子文件夹.

wamp|-- 万维网|-- 第一章|-- 第二章|-- 等

然后这些子文件夹将显示为 WampServer 主页中名为您的项目"菜单下的链接,这些链接将包含指向 localhost/subfoldername 的链接.

仅适用于简单教程

这使初学者的生活变得轻松,并且对于那些遵循以下教程学习 PHP 编码的人来说是完全可以接受的.但是,它从未打算在开发一个您以后想要复制到您的实时托管服务器的真实网站时使用.事实上,如果您确实使用了这种机制,它通常会导致问题,因为实时站点配置与您的开发配置不匹配.

真正的网站开发问题.

这样做的原因当然是wamp的默认DocumentRoot设置是

DocumentRoot "c:/wamp/www/"

不管你的子文件夹叫什么.这个经常使用查询结构的 PHP 代码或您的站点在您的开发 WampServer 上运行时收到的信息与在实时托管服务器上运行时收到的信息不同,其中 DocumentRoot 配置指向网站顶部的文件夹文件层次结构.这种代码存在于许多框架和 CMS 中,例如 WordPress 和 Joomla 等.

举例

假设我们在 wampwwwproject1 中保存了一个名为 project1 的项目,并且以 localhost/project1/index.php

错误地运行

这是一些有问题的 PHP 命令会报告的内容:

$_SERVER['HTTP_HOST'] = 本地主机$_SERVER['SERVER_NAME'] = 本地主机$_SERVER['DOCUMENT_ROOT'] = c:/wamp/www

现在,如果我们使用虚拟主机定义正确定义了该站点并将其作为 http://project1 运行,WAMPServer 开发站点上的结果将与在实时托管环境中收到的结果相匹配.

$_SERVER['HTTP_HOST'] = project1$_SERVER['SERVER_NAME'] = project1$_SERVER['DOCUMENT_ROOT'] = c:/wamp/www/project1

现在,这种差异起初可能看起来微不足道,但如果您使用 WordPress 之类的框架或 Joomla 等 CMS 之一,那么当您将网站移动到实时服务器时,这可能而且确实会导致问题.

如何在 WampServer 中创建虚拟主机

实际上,这对于任何 wndows Apache 服务器应该基本相同,不同之处仅在于您可以找到 Apache 配置文件的位置.

在 Apache 中创建您的第一个虚拟主机需要 3 个步骤,如果您已经定义了一个,则只需 2 个.

  1. 创建虚拟主机定义
  2. 将您的新域名添加到 HOSTS 文件中.
  3. 取消注释 httpd.conf 中包含虚拟主机定义文件的行.

第 1 步,创建虚拟主机定义

编辑 WampServer 所在的名为 httpd-hosts.conf 的文件

wampinapacheapache2.4.9confextrahttpd-vhosts.conf

(Apache 版本号可能不同,请先动脑筋再继续)

如果是第一次编辑这个文件,去掉默认的示例代码,没有用.

我假设我们要为一个名为 project1 的站点创建一个定义

wampwwwproject1

非常重要,首先我们必须确保 localhost 仍然有效,这是我们将在此文件中放入的第一个 VHOST 定义.

<VirtualHost *:80>DocumentRoot "c:/wamp/www"服务器名称本地主机ServerAlias 本地主机<目录"c:/wamp/www>选项索引 FollowSymLinks允许覆盖所有需要本地</目录></虚拟主机>

现在我们定义我们的项目:当您开始一个新项目时,您当然会为每个项目执行此操作.

<VirtualHost *:80>DocumentRoot "c:/wamp/www/project1"服务器名称项目1<目录c:/wamp/www/project1">选项索引 FollowSymLinks允许覆盖所有需要本地</目录></虚拟主机>

注意:每个虚拟主机都作为自己的DocumentRoot 定义.您还可以将许多其他参数添加到虚拟主机定义中,请查看 Apache 文档.

偏小

虚拟主机在 Apache 中的工作方式:此文件中的第一个定义也将是默认站点,因此如果浏览器中使用的域名与任何实际定义的虚拟托管域不匹配,则使 localhost 成为文件中的第一个域因此,如果黑客尝试仅使用您的 IP 地址,它将使其成为加载的站点.因此,如果我们确保该域的 Apache 安全性始终设置为

需要本地

任何来自外部地址的随意黑客都会收到错误并且不会进入您的 PC,但如果您拼错了域,您将看到 WampServer 主页,因为您与 WampServer 位于同一台 PC 上,因此 本地.

第 2 步:

将您的新域名添加到 HOSTS 文件中.现在我们需要将我们在虚拟主机定义中使用的域名添加到 HOSTS 文件中,以便 windows 知道在哪里可以找到它.这类似于创建 DNS A 记录,但仅在这种情况下在此特定 PC 上可见.

编辑C:windowssystem32driversetchosts

该文件没有扩展名,应该保持这种状态.注意记事本,如果您没有更好的编辑器,它可能会尝试添加 .txt 扩展名.我建议你下载 Notepad++,它是一款免费的非常好的编辑器.

此外,这是一个受保护的文件,因此您必须使用管理员权限对其进行编辑,因此请使用 以管理员身份运行菜单选项.

完成这些编辑后,hosts 文件应如下所示

127.0.0.1 本地主机127.0.0.1 项目1::1 本地主机::1个项目1

请注意,您应该在此处定义 IPV4 环回地址 127.0.0.1 以及 IPV6 环回地址 ::1,因为 Apache 现在可以识别 IPV6,并且浏览器将使用 IPV4 或 IPV6 或两者.我不知道它是如何决定使用哪个的,但是如果你打开了 IPV6 堆栈,它就可以使用,而且大多数窗口操作系统从 XP SP3 开始就可以使用.

现在我们必须告诉 windows 刷新它的域名缓存,所以使用 以管理员身份运行菜单选项再次,并执行以下操作.

net stop dnscache网络启动 dnscache

这会强制 Windows 清除其域名缓存并重新加载它,在重新加载时它将重新读取 HOSTS 文件,因此现在它知道域 project1.

第 3 步:取消注释 httpd.conf 中包含虚拟主机定义文件的行.

编辑您的 httpd.conf,使用 wampmanager.exe 菜单确保编辑正确的文件.

在 httpd.conf 中找到这一行

# 虚拟主机#包括conf/extra/httpd-vhosts.conf

只需删除 # 即可取消注释该行.

要在您运行 Apache 时激活此更改,我们现在必须停止并重新启动 Apache 服务.

wampmanager.exe ->阿帕奇->服务->重启服务

现在如果系统托盘中的 WAMP 图标没有再次变绿,这意味着您可能在 wampinapacheapache2.4.9confextrahttpd-hosts 中做错了.conf 文件.

如果是这样,这里有一个有用的机制来找出问题所在.它使用 Apache exe (httpd.exe) 的一项功能来检查其配置文件并通过文件名和行号报告错误.

启动命令窗口.

cd wampinapacheapache2.4.9inhttpd -t

所以修复错误并重新测试,直到得到输出

语法OK

现在还有一件事.

wampmanager 菜单系统实际上有 2 个新菜单项.一个名为我的项目",默认情况下是打开的.第二个,称为 'My Virtual Hosts',默认情况下未激活.

我的项目"将列出 wampwww 目录的任何子目录,并提供在该子目录中启动站点的链接.正如我之前所说,它启动的是project1"而不是localhost/project1",因此为了使链接正常工作,我们必须创建一个虚拟主机定义,以使该链接在您的浏览器中实际启动该站点,而没有虚拟主机定义很可能启动网站名称作为关键字的网络搜索,或者只返回未找到网站的条件.

我的虚拟主机"菜单项略有不同.它搜索用于定义虚拟主机的文件(我们将在稍后介绍)并为它找到的每个 ServerName 参数创建菜单链接,并为每个参数创建一个菜单项.这似乎有点令人困惑,因为一旦我们为 wampwww 文件夹的子目录创建了虚拟主机定义,一些项目将同时出现在我的项目"菜单和我的虚拟主机"菜单上.

如何打开另一个我的虚拟主机"菜单?

  • 备份 wampwampmanager.tpl 文件,以防万一,这是一个非常重要的文件.
  • 编辑 wampwampmanager.tpl
  • 找到这个参数;WAMPPROJECTSUBMENU,它在'[Menu.Left]'部分.
  • ;WAMPPROJECTSUBMENU 参数之前或之后添加此新参数 ;WAMPVHOSTSUBMENU.
  • 保存文件.
  • 现在右键单击 wampmanager 图标,然后选择刷新".如果这没有添加菜单,请退出"并重新启动 wampmanager.

大笔记仅当您已经定义了一些虚拟主机时,才会出现新菜单!否则,在您定义 VHOST 之前,您将看不到任何区别.

现在如果你把它带到它的逻辑扩展上

您现在只需更改 VHOST 定义中的 DocumentRoot 参数,即可将您的网站代码完全移出 wamp 文件夹结构.例如,您可以这样做:

在 wamp 磁盘或任何其他磁盘上创建一个文件夹(注意网络驱动器,它们有点复杂)

D:医学博士网站光盘网站MD example.comCD example.com万维网

您现在将您的站点代码复制到,或开始在 websitesexample.comwww 文件夹中创建它,并像这样定义您的 VHOST:

<VirtualHost *:80>DocumentRootd:/websites/example.com/www"服务器名称 example.devServerAlias www.example.dev<目录"d:/websites/example.com/www>选项索引 FollowSymLinks允许覆盖所有要求所有授予</目录>php_flag display_errors 关闭php_flag log_errors 开启php_value max_upload_size 40Mphp_value max_execution_time 60php_value error_log d:/wamp/logs/example_com_phperror.log"</虚拟主机>

然后将这个新的开发域添加到 HOSTS 文件中:

127.0.0.1 本地主机::1 本地主机127.0.0.1 项目1::1个项目1127.0.0.1 例子.dev::1 example.dev

注意:使用与您的实时域名相同的 ServerName 或 ServerAlias 不是一个好主意,就像我们使用 example.com 作为 ServerName 一样,这意味着我们无法再访问来自这台 PC 的真实现场站点,因为它将 example.com 指向 127.0.0.1,即这台 PC,而不是连接到 Internet.

另外:请注意,我已允许从 VHOST 定义中从 Internet 访问此站点,此更改将仅适用于此站点,不适用于其他站点.对于允许客户端在一个小时左右的时间内查看您的更改而无需将它们复制到实时服务器非常有用.这确实意味着我们必须手动编辑此文件以打开和关闭此访问权限,而不是使用 wampmanager 上的 Put Online/Offline 菜单项.

我还对 PHP 配置添加了一些修改,同样只适用于这个站点.与您维护的所有其他站点不同,在维护具有特定要求的站点时非常有用.我想我们可以从所使用的参数中假设它在某个地方有一个长时间运行的页面,并且它写得非常糟糕,并且不会在浏览器上显示错误而不会使页面变得混乱.相信我存在这样的网站,但人们仍然希望他们维护得很糟糕.但这意味着我们只需针对这个特定站点更改这些参数,而不是全局更改 WampServer 上运行的所有虚拟站点.

I am installing the Wamp Server on another computer to run a mid-sized database and UI. I have been successful in blocking IIS and routing the server to Localhost:8080. But whenever I try to access on of my projects from the localhost homepage, in the www file; I get redirected to a Page not found error.

When I hover above the links the directory always comes up "http:// ProjectFolderNameHere /". when it's supposed to be "http:// LocalHost:8080 / ProjectFolderNameHere /". What can I do to get the links working properly?

My Machine runs on Windows 7 Home Edition 64-bits, and I already have Microsoft's IIS disabled.

解决方案

How to create a Virtual Host in WampServer


WAMPServer 3 has made this process much easier!

You can do almost everything from a utility provided as part of WAMPServer.

  • Create a folder inside to contain your project.site. This can be under the C:wampwww directory or in a completely seperate folder like C:websites.

  • Create a folder inside the location you have chosen EG C:websitesproject1www or under the c:wampwwwproject1www

  • Now open localhost wampmanager->localhost and click on the link Add a Virtual Host under the TOOLS section on the homepage.

You will see a page like this:

  • Fill in the fields as specified by the instructions above each field

  • The Virtual Host config will have been created for you.

  • Now you must restart the DNS Cache. You can do this from the wampmanager menus like this right click wampmanager->Tools->Restart DNS. The DNS Cache will be restarted and then Apache will also be stopped and restarted. When the wampmanager icon goes green again all is completed.

  • Now you must create a simple index.php file or install your site into the folder you created above.

  • Assuming your VH was called project.dev You should see that name under the Your Virtual Hosts Section of the WAMPServer homepage.

  • You can launch the site from this menu, or just use the new Domain Name in the address bar EG project1.dev and the site shoudl launch.


Old WAMPServer 2.5 mechanism, or if you want to do it all manually

There has been a change of concept in WampServer 2.5 and above and there is a good reason for this change!

In WampServer it is now STRONGLY encouraged to create a Virtual Host for each of your projects, even if you hold them in a wampwwwsubfolder structure.

Virtual Hosts Documentation

Virtual Host Examples

The WampServer home page ( wampwwwindex.php ) now expects you to have created a Virtual Host for all your projects and will therefore work properly only if you do so.

History

In order to make life easier for beginners using WampServer to learn PHP Apache and MySQL it was suggested that you create subfolders under the wampwww folder.

wamp
  |-- www
       |-- Chapter1
       |-- Chapter2
       |-- etc

These subfolders would then show as links in the WampServer Homepage under a menu called 'Your Projects' and these links would contain a link to localhost/subfoldername.

Acceptable only for simple tutorials

This made life easy for the complete beginner, and was perfectly acceptable for example for those following tutorials to learn PHP coding. However it was never intended for use when developing a real web site that you would later want to copy to your live hosted server. In fact if you did use this mechanism it often caused problems as the live sites configuration would not match your development configuration.

The Problem for real website development.

The reason for this is of course that the default DocumentRoot setting for wamp is

DocumentRoot "c:/wamp/www/"

regardless of what your subfolder was called. This ment that often used PHP code that queried the structure or your site received different information when running on your development WampServer to what it would receive when running on a live hosted server, where the DocumentRoot configuration points to the folder at the top of the website file hierarchy. This kind of code exists in many frameworks and CMS's for example WordPress and Joomla etc.

For Example

Lets say we have a project called project1 held in wampwwwproject1 and run incorrectly as localhost/project1/index.php

This is what would be reported by some of the PHP command in question:

$_SERVER['HTTP_HOST'] = localhost
$_SERVER['SERVER_NAME'] = localhost
$_SERVER['DOCUMENT_ROOT'] = c:/wamp/www

Now if we had correctly defined that site using a Virtual Host definition and ran it as http://project1 the results on the WAMPServer devlopment site will match those received when on a live hosted environment.

$_SERVER['HTTP_HOST'] = project1
$_SERVER['SERVER_NAME'] = project1
$_SERVER['DOCUMENT_ROOT'] = c:/wamp/www/project1

Now this difference may seem trivial at first but if you were to use a framework like WordPress or one of the CMS's like Joomla for example, this can and does cause problems when you move your site to a live server.

How to create a Virtual Host in WampServer

Actually this should work basically the same for any wndows Apache server, with differences only in where you may find the Apache config files.

There are 3 steps to create your first Virtual Host in Apache, and only 2 if you already have one defined.

  1. Create the Virtual Host definition(s)
  2. Add your new domain name to the HOSTS file.
  3. Uncomment the line in httpd.conf that includes the Virtual Hosts definition file.

Step 1, Create the Virtual Host definition(s)

Edit the file called httpd-hosts.conf which for WampServer lives in

wampinapacheapache2.4.9confextrahttpd-vhosts.conf

(Apache version numbers may differ, engage brain before continuing)

If this is the first time you edit this file, remove the default example code, it is of no use.

I am assuming we want to create a definition for a site called project1 that lives in

wampwwwproject1

Very important, first we must make sure that localhost still works so that is the first VHOST definition we will put in this file.

<VirtualHost *:80>
    DocumentRoot "c:/wamp/www"
    ServerName localhost
    ServerAlias localhost
    <Directory  "c:/wamp/www">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

Now we define our project: and this of course you do for each of your projects as you start a new one.

<VirtualHost *:80>
    DocumentRoot "c:/wamp/www/project1"
    ServerName project1
    <Directory  "c:/wamp/www/project1">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

NOTE: That each Virtual Host as its own DocumentRoot defined. There are also many other parameters you can add to a Virtual Hosts definition, check the Apache documentation.

Small aside

The way virtual hosts work in Apache: The first definition in this file will also be the default site, so should the domain name used in the browser not match any actually defined virtually hosted domain, making localhost the first domain in the file will therefore make it the site that is loaded if a hack attempt just uses your IP Address. So if we ensure that the Apache security for this domain is ALWAYS SET TO

Require local

any casual hack from an external address will receive an error and not get into your PC, but should you misspell a domain you will be shown the WampServer homepage, because you are on the same PC as WampServer and therfore local.

Step 2:

Add your new domain name to the HOSTS file. Now we need to add the domain name that we have used in the Virtual Host definition to the HOSTS file so that windows knows where to find it. This is similiar to creating a DNS A record, but it is only visible in this case on this specific PC.

Edit C:windowssystem32driversetchosts

The file has no extension and should remain that way. Watch out for notepad, as it may try and add a .txt extension if you have no better editor. I suggest you download Notepad++, its free and a very good editor.

Also this is a protected file so you must edit it with administrator privileges, so launch you editor using the Run as Administrator menu option.

The hosts file should look like this when you have completed these edits

127.0.0.1 localhost
127.0.0.1 project1

::1 localhost
::1 project1

Note that you should have definitions in here for the IPV4 loopback address 127.0.0.1 and also the IPV6 loopback address ::1 as Apache is now IPV6 aware and the browser will use either IPV4 or IPV6 or both. I have no idea how it decides which to use, but it can use either if you have the IPV6 stack turned on, and most window OS's do as of XP SP3.

Now we must tell windows to refresh its domain name cache, so launch a command window again using the Run as Administrator menu option again, and do the following.

net stop dnscache
net start dnscache

This forces windows to clear its domain name cache and reload it, in reloading it will re-read the HOSTS file so now it knows about the domain project1.

Step 3: Uncomment the line in httpd.conf that includes the Virtual Hosts definition file.

Edit your httpd.conf, use the wampmanager.exe menus to make sure you edit the correct file.

Find this line in httpd.conf

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

And just remove the # to uncomment that line.

To activate this change in you running Apache we must now stop and restart the Apache service.

wampmanager.exe -> Apache -> Service -> Restart Service

Now if the WAMP icon in the system tray does not go GREEN again, it means you have probably done something wrong in the wampinapacheapache2.4.9confextrahttpd-hosts.conf file.

If so here is a useful mechanism to find out what is wrong. It uses a feature of the Apache exe (httpd.exe) to check its config files and report errors by filename and line numbers.

Launch a command window.

cd wampinapacheapache2.4.9in
httpd -t

So fix the errors and retest again until you get the output

Syntax OK

Now there is one more thing.

There are actually 2 new menu items on the wampmanager menu system. One called 'My Projects' which is turned on by default. And a second one, called 'My Virtual Hosts', which is not activated by default.

'My Projects' will list any sub directory of the wampwww directory and provide a link to launch the site in that sub directory. As I said earlier, it launches 'project1` and not 'localhost/project1' so to make the link work we must create a Virtual Host definition to make this link actually launch that site in your browser, without the Virtual Host definition it's likely to launch a web search for the site name as a keyword or just return a site not found condition.

The 'My Virtual Hosts' menu item is a little different. It searches the file that is used to define Virtual Hosts ( we will get to that in a minute ) and creates menu links for each ServerName parameter it finds and creates a menu item for each one. This may seem a little confusing as once we create a Virtual Host definition for the sub directories of the wampwww folder some items will appear on both of the 'My Projects' menu and the 'My Virtual Hosts' menu's.

How do I turn this other 'My Virtual Hosts' menu on?

  • Make a backup of the wampwampmanager.tpl file, just in case you make a mistake, its a very important file.
  • Edit the wampwampmanager.tpl
  • Find this parameter ;WAMPPROJECTSUBMENU, its in the '[Menu.Left]' section.
  • Add this new parameter ;WAMPVHOSTSUBMENU either before or after the ;WAMPPROJECTSUBMENU parameter.
  • Save the file.
  • Now right click the wampmanager icon, and select 'Refresh'. If this does not add the menu, 'exit' and restart wampmanager.

Big Note The new menu will only appear if you already have some Virtual Hosts defined! Otherwise you will see no difference until you define a VHOST.

Now if you take this to its logical extension

You can now move your web site code completely outside the wamp folder structure simply by changing the DocumentRoot parameter in the VHOST definition. So for example you could do this:

Create a folder on the wamp disk or any other disk ( beware of network drive, they are a bit more complicated)

D:
MD websites
CD websites
MD example.com
CD example.com
MD www

You now copy your site code to, or start creating it in the websitesexample.comwww folder and define your VHOST like this:

<VirtualHost *:80>
    DocumentRoot "d:/websites/example.com/www"
    ServerName example.dev
    ServerAlias www.example.dev
    <Directory  "d:/websites/example.com/www">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    php_flag display_errors Off
    php_flag log_errors On

    php_value max_upload_size 40M
    php_value max_execution_time 60
    php_value error_log "d:/wamp/logs/example_com_phperror.log"
</VirtualHost>

Then add this new development domain to the HOSTS file:

127.0.0.1 localhost
::1 localhost

127.0.0.1 project1
::1 project1

127.0.0.1 example.dev
::1 example.dev

NOTE: It is not a good idea to use a ServerName or ServerAlias that is the same as your live domain name, as if we had used example.com as the ServerName it would mean we could no longer get to the real live site from this PC as it would direct example.com to 127.0.0.1 i.e. this PC and not out onto the internet.

ALSO: See that I have allowed this site to be accessed from the internet from within the VHOST definitions, this change will apply to only this site and no other. Very useful for allowing a client to view your changes for an hour or so without having to copy them to the live server. This does mean that we have to edit this file manually to turn this access on and off rather than use the Put Online/Offline menu item on wampmanager.

Also I have added some modifications to the PHP config, again that will only apply to this one site. Very useful when maintaining a site with specific requirement unlike all the other sites you maintain. I guess we can assume from the parameters used that it has a long running page in it somewhere and it is very badly written and will not run with errors being displayed on the browser without making a horrible mess of the page. Believe me sites like this exist and people still want them maintained badly. But this mean we only have to change these parameters for this specific site and not globally to all Virtual sites running on WampServer.

这篇关于项目链接在 Wamp Server 上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆