Jump to content

my localhost shows all files in the directory?


sayedsohail

Recommended Posts

i am on windows aswell, if found document root directing to htdocs and further below doucment root htdocs, you mean i should change this directing to my project directory on both of this places.

 

# DocumentRoot: The directory out of which you will serve your

DocumentRoot "C:/Program Files/Apache2.2/htdocs"

 

and another place it says:

 

# This should be changed to whatever you set DocumentRoot to.

#

<Directory "C:/Program Files/Apache2.2/htdocs">

   

 

 

 

Link to comment
Share on other sites

Those two lines must be changed equally. U dont have to change the DocumentRoot to match your project directory, just copy/paste your project to "C:/Program Files/Apache2.2/htdocs". Eventhough in a local environment it isnt important to test have your project in the root. U can paste your project in a directory ex: "C:/Program Files/Apache2.2/htdocs/myproject/" and access it via http with "http://localhost/myproject".

Link to comment
Share on other sites

The production environment will be basically the same as your local one. Instead of being in the root ex "var/www/html", ull be in ex "var/username/www/html" where html is your root as a user. Talking about shared ones as in dedicated u can do whatever u want. Copy/paste your project files in the root directory of your account by ftp and access the site by your domain or whatever.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.