Can someone help me out. I run into a problem when I run a file (e.g. index.php). Every time when I want to run a file on the test server (XAMPP) Eclipse (PDT) adds the project name (e.g. testproject) after the server name (e.g. http://testproject.dev
). Because I have setup a virtual host setup to automatically use a specific path (e.g. http://testproject.dev
is linked to http://localhost/testproject
) on the server this creates a problem. Eclipse adds the project name and then the URL becomes http://testproject.dev/testproject/index.php
.
This are my configurations:
XAMPP httpd.conf (c:\xampp\conf\httpd.conf)
# Virtual hosts
Include "conf/extra/httpd-vhosts.conf"
httpd-vhosts.conf (c:\xampp\conf\extra\httpd-vhosts.conf)
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "C:/xampp/htdocs/testproject"
ServerName testproject.dev
</VirtualHost>
Windows 7 Windows vhost file (C:\Windows\System32\drivers\etc\hosts)
127.0.0.1 testproject.dev
Eclipse -> Preferences -> PHP Server
Tab "Server": Name: "Development_Server_Testproject" URL:
http://testproject.dev
Tab "Path Mapping": Path on server
http://testproject.dev
Path in workspace
/testproject