RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 04:38 PM |
Hi everyone.
I've been working with web development, and I'm running a home made testing server so I can get better at web development. But when traveling to 'localhost' on my browser, I get the following:
"Index of /" And my Index.php file below, and at the bottom:
"Apache/2.0.64 (Win32) Server at localhost Port 80"
How do I disable this on WINDOWS. I've found tutorials for Linux and UNIX, but what about WINDOWS? |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2012 04:57 PM |
| You probably need a certain computer connector,downloader,or equipment |
|
|
| Report Abuse |
|
|
GigsD4X
|
  |
| Joined: 06 Jun 2008 |
| Total Posts: 3794 |
|
|
| 15 Apr 2012 04:59 PM |
| Rename Index.php to index.php |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 05:00 PM |
| No, I need to change settings, I know where the settings file is, but what settings do I change? |
|
|
| Report Abuse |
|
|
GigsD4X
|
  |
| Joined: 06 Jun 2008 |
| Total Posts: 3794 |
|
|
| 15 Apr 2012 05:01 PM |
| Why would you want to do that? |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 05:01 PM |
@Gigs
It is "index.php" I just capitalized it because it's a name. |
|
|
| Report Abuse |
|
|
GigsD4X
|
  |
| Joined: 06 Jun 2008 |
| Total Posts: 3794 |
|
|
| 15 Apr 2012 05:06 PM |
There's something wrong with your server then. If you're just starting out with this, I strongly suggest you use free shared hosting (like x10hosting or freewebhostingarea) for now and you won't have to deal with all the pain that is setting up a server.
Unless you're using some sort of Linux distribution. Then it's really easy to set it up.
But you're using Windows. |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
| |
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 15 Apr 2012 05:18 PM |
| Under Windows, edit the apache\conf\httpd.conf file. Durr... |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 05:20 PM |
@Local
I know!!
But what part?! |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 15 Apr 2012 05:24 PM |
| Just add "Options -Indexes" (w/o quotes, of course) to the end of your conf file or put that into a .htaccess file in your public_html/htdocs/www folder. |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 05:39 PM |
@Local
Doesn't work, still get the index.
(I've added the line you suggested to the end of my settings file.) |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 05:43 PM |
@local
Here's my directory.
Apache2>htdocs>index.php
Did I do something wrong? |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
| |
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
| |
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 15 Apr 2012 07:41 PM |
| Just rename it default.php and carry on. |
|
|
| Report Abuse |
|
|
GigsD4X
|
  |
| Joined: 06 Jun 2008 |
| Total Posts: 3794 |
|
|
| 15 Apr 2012 08:05 PM |
If you don't know anything about web development yet then use free shared hosting as I mentioned above. After you're good at say..PHP, you'll also learn about Apache and all that server stuff and you'll be able to understand it better and set up your own local webserver.
But for now, stick to free shared hosting. |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 15 Apr 2012 08:07 PM |
| Use .htacess and find the appropriate no-index command. |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 10:47 PM |
@Everyone
I've created an HTML file called 'index', and it redirects to my PHPs. |
|
|
| Report Abuse |
|
|
miloguy
|
  |
| Joined: 19 Dec 2009 |
| Total Posts: 7702 |
|
|
| 15 Apr 2012 11:01 PM |
| Is index.php the only file in htdocs? |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 11:07 PM |
@Milo
I have a new problem, should I ask it here, or create a new thread for it? |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2012 11:13 PM |
nub
yunobasicwebsitesmarts
This is now a pony thread.
-expro |
|
|
| Report Abuse |
|
|
miloguy
|
  |
| Joined: 19 Dec 2009 |
| Total Posts: 7702 |
|
|
| 15 Apr 2012 11:14 PM |
@RobloIT You might as well ask it here |
|
|
| Report Abuse |
|
|
RobloIT
|
  |
| Joined: 19 Jun 2011 |
| Total Posts: 890 |
|
|
| 15 Apr 2012 11:20 PM |
| OK, I have my HTML file (which runs perfectly, I go to 'localhost' and it's there) but when I redirect to my PHP file, it just displays the PHP's source. |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2012 11:29 PM |
You need to add something to your htaccess to allow php to render in files ending in HTML. Can't recall what, though...
In your HTML simply add (greater than sign)PHP include("file.php"); ?(less than sign) |
|
|
| Report Abuse |
|
|