使用PHP - XAMPP使用Apache配置文件为localhost创建别名

时间:2017-02-08 05:43:15

标签: php apache

I installed XAMPP on my windows machine
I changed the DocumentRoot and Directory paths to
C:\dev\CustomCloud\prod 

由于我确实让XAMPP在Windows上工作,我改为指向我需要设置和修改的代码。 Localhost我现在看到了大量的404错误

我指的这个PHP代码试图解析localhost/matchmaking/

的ALIAS

示例:

C:\dev\CustomCloud\prod\assets 

http://localhost/matchmaking/assets/

如何让apache / xampp / php使用别名?

虚拟目录与IIS for MS项目asp.net很容易,但我正在查看这篇文章http://httpd.apache.org/docs/2.4/urlmapping.html

我会做AliasScriptAliasMatch吗?

 Alias "/docs" "/var/web" ... 
 ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)"   "/home/$1/cgi-bin/$2"

在我的配置中

  #DocumentRoot "C:/xampp/htdocs"
  #<Directory "C:/xampp/htdocs">
  #"C:/dev/CustomCloud/prod"
  DocumentRoot "C:/dev/CustomCloud/prod"
  <Directory "C:/dev/CustomCloud/prod">

1 个答案:

答案 0 :(得分:0)

尝试将其添加到配置中,然后重新加载/重新启动服务。

Private Sub CommandButton1_Click()

Dim rates(0 To 5, 0 To 5) As Double, i As Integer, j As Integer

rates(0, 0) = 1
rates(0, 1) = 86400
rates(0, 2) = 100
rates(0, 3) = 8640000
rates(0, 4) = 283460
rates(0, 5) = 2120428.8

rates(1, 0) = 0.000011574
rates(1, 1) = 1
rates(1, 2) = 0.0011574
rates(1, 3) = 100
rates(1, 4) = 3.2808
rates(1, 5) = 24.542

rates(2, 0) = 0.01
rates(2, 1) = 864
rates(2, 2) = 1
rates(2, 3) = 86400
rates(2, 4) = 2834.6
rates(2, 5) = 21204.288

rates(3, 0) = 0.00000011574
rates(3, 1) = 0.01
rates(3, 2) = 0.000011574
rates(3, 3) = 1
rates(3, 4) = 0.032808
rates(3, 5) = 0.24542

rates(4, 0) = 0.0000035278
rates(4, 1) = 0.3048
rates(4, 2) = 0.00035278
rates(4, 3) = 30.4805
rates(4, 4) = 1
rates(4, 5) = 7.4333

rates(5, 0) = 4.74600000000001E-07
rates(5, 1) = 4.10054400000001E-02
rates(5, 2) = 4.74600000000001E-05
rates(5, 3) = 4.10054400000001
rates(5, 4) = 0.134530116
rates(5, 5) = 1

For i = 0 To 5
    For j = 0 To 5
        If ListBox1.ListIndex = i And ListBox2.ListIndex = j Then TextBox2.Value = TextBox1.Value * rates(i, j)
    Next j
Next i

End Sub


Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    CommandButton1_Click
End Sub

Private Sub ListBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = vbKeyReturn Then
        CommandButton1_Click
    End If
End Sub


Private Sub ListBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    CommandButton1_Click
End Sub

Private Sub ListBox2_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = vbKeyReturn Then
        CommandButton1_Click
    End If
End Sub

Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = vbKeyReturn Then
        CommandButton1_Click
    End If
End Sub

Private Sub TextBox2_Change()

    If Len(TextBox2) > 5 Then
    TextBox2 = Format(TextBox2, "0.00E+00")
    End If

End Sub
Private Sub UserForm_Initialize()

With ListBox1
    .AddItem "m/s"
    .AddItem "m/dag"
    .AddItem "cm/s"
    .AddItem "cm/dag"
    .AddItem "ft/day"
    .AddItem "gpd/ft2"
End With

With ListBox2
    .AddItem "m/s"
    .AddItem "m/dag"
    .AddItem "cm/s"
    .AddItem "cm/dag"
    .AddItem "ft/day"
    .AddItem "gpd/ft2"
End With

ListBox1.ListIndex = 0
ListBox2.ListIndex = 2

TextBox1.Value = 1
TextBox2.Value = 100

End Sub