Reputation: 12747
I can't for the life of me understand where the previous developer set up the configuration of the localhost system so that the application can run with a URL like:
http://my-app/index.php
instead of
http://localhost/index.php
I've checked the following files but can't find my-app
anywhere:
httpd-vhosts.conf
, the windows hosts
file, wampmanager.tpl
, wampmanager.ini
, .htaccess
, and files inside the wamp/bin/apache/Apachexxxx/
folder. Where on earth else should I look for this mysterious setting? The application's running on wampserver 2.1
Upvotes: 1
Views: 1189
Reputation: 12747
Problem solved! It's so simple I can't believe I'd been cracking my head over this for days.
The old developer had simply renamed the computer name, from (right-click) My Computer's Properties. The name was changed to my-app
. That's it.
Upvotes: 1
Reputation: 10717
When you enter my-app.com
to browser, open website under the C:/wamp/www/my-app/
folder.
Append to file below VirtualHost
block.
Important: Below codes based under the C:/wamp/www/my-app/
files. You can change what you want.
C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/wamp/www/my-app/"
ServerName my-app.com
ServerAlias www.my-app.com
ErrorLog "logs/my-app.com-error.log"
CustomLog "logs/my-app.com-access.log" common
</VirtualHost>
Append line like this:
C:\Windows\System32\drivers\etc\hosts
127.0.0.1 my-app.com
127.0.0.1 www.my-app.com
And RESTART your WAMP server..
Upvotes: 0
Reputation: 13535
check your hosts
file. Since your running windows its in the following path
c:\windows\system32\drivers\etc\hosts
Upvotes: 0