How can I view my pages in chrome w/ a local address? Chrome keeps searching the web

177 views Asked by At

Hello I am trying to do some web development for the first time and just trying to set up my machine to do use PHP and MySQL.

I have installed Apache and now I am trying to edit one of the Apache files to let me use 'mywebsite.webdev' in my address bar to navigate to my index.html.

Localhost works and I can see Apache but i went into extras>httpd-vhosts.conf to try to set up a url for myself and chrome just searches the web.

Every time I try to put that address into Google chrome it just searches the web for it.

Is there a way to disable the auto search on Google chrome?

3

There are 3 answers

0
learner On

Did you type the full address? e-g: http://mhywebsite.webdev ?

0
Hobbes On

You'll want to use localhost such as "localhost/mywebsite.webdev" this will only work of course if you have a local apache (or equivalent) service running. Without that service only local html pages and a few other file types will accepted by the browser.

Since you are using php and mysql I would recommend using XAMPP.

Edit: I see that you edited your question to state you are using apache. Maybe you should post that conf file to see if it is setup correctly.

0
Kirk Beard On

Have you updated your hosts file to point that domain at your local copy of Apache?

You need to add the line:

127.0.0.1 mywebsite.webdev

Your hosts file will be hosted In one of these locations:

Windows:

C:\Windows\System32\Drivers\etc\hosts

OSX

/etc/hosts

More information: http://www.rackspace.com/knowledge_center/article/how-do-i-modify-my-hosts-file