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

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

Since I did have XAMPP working on windows , I changed to point at code that i need to setup and modify. Localhost I now see tons of 404 errors

This PHP code I am pointing at is trying to resolve an ALIAS of localhost/matchmaking/

Example:

C:\dev\CustomCloud\prod\assets 

Is

http://localhost/matchmaking/assets/

How can I get the apache /xampp/ php to use an alias ?

This is easy with virtual directory with IIS for MS projects asp.net but I was looking at this article http://httpd.apache.org/docs/2.4/urlmapping.html

So would i do something like Alias or ScriptAliasMatch ?

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

Inside my config

  #DocumentRoot "C:/xampp/htdocs"
  #<Directory "C:/xampp/htdocs">
  #"C:/dev/CustomCloud/prod"
  DocumentRoot "C:/dev/CustomCloud/prod"
  <Directory "C:/dev/CustomCloud/prod">
查看全部
donglian1982
donglian1982
2017/02/08 05:43
  • apache
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复