【问题标题】:Website outside the htdocshtdocs 以外的网站
【发布时间】:2017-03-05 04:17:53
【问题描述】:

我在 htdocs 之外配置网站,我做了所有更改,这里描述了 Virtual Host。 但部分完成,但路线不起作用。仅显示主页。页面的其余部分显示 Object not found!.

喜欢

<VirtualHost *:81>
DocumentRoot "C:\DevlopmentApps\VirtualMarket"
ServerName sjb.localhost
<Directory C:\DevlopmentApps\VirtualMarket>
   Options Indexes 
   AllowOverride none
   Require all granted
</Directory>

现在

http://sjb.localhost:81/sjb is working
http://sjb.localhost:81/sjb/find/ not working

【问题讨论】:

  • 请添加虚拟主机配置
  • 上面我提到了链接。我确实做到了。 stackoverflow.com/questions/1408/…
  • 您在&lt;Directory&gt; 中的allowOverride 似乎有问题尝试将&lt;Directory&gt;....&lt;/Directory&gt; 替换为&lt;Directory C:\DevlopmentApps\VirtualMarket&gt; Order allow,deny Allow from all &lt;/Directory&gt;
  • 那我该怎么办?我是php新手,所以我不明白。

标签: php xampp


【解决方案1】:

现在我想出了一些其他人应该知道的事情。

如果要在 htdocs 之外进行配置,需要在以下链接中执行以下步骤

Virtual host

这里有些东西已弃用。 https://stackoverflow.com/questions/9110179/adding-virtualhost-fails-access-forbidden-error-403-xampp-windows-7?answertab=votes#tab-top

<Directory ..........>
    # AllowOverride All      # Deprecated
    # Order Allow,Deny       # Deprecated
    # Allow from all         # Deprecated

    # --New way of doing it
    Require all granted    
</Directory>

现在解决我的问题的一件事是

Options All
AllowOverride All
Require all granted

【讨论】:

    猜你喜欢
    • 2017-03-05
    • 2018-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-06
    • 1970-01-01
    • 1970-01-01
    • 2012-10-10
    相关资源
    最近更新 更多