When I browse my website it shows me a directory listing instead of web pages:
How do I stop this happening?
Looks like you've got Directory Browsing turned on:
Open the site properties and select the Home Directory tab. Uncheck "Directory Browsing".
If you're seeing a directory listing rather than the Default.aspx page being loaded up then you're missing "Default.aspx" as a default document. Check out Setting Up Default Documents in IIS6.
Related
I set the Directory Browsing to false in IIS. After that it is not possible to list files in directories on website. It works! However I can browse the file path through the http link. The following example screenshot below shows that sensitive information such as application log were disclosed within the ‘log’ folder through directory listing of the web server
How to disable file browsing also?
You can set permissions for these files so that users don’t have access. Click on your website in the sites and right-click find switch to the content view, you can see your website documents and then edit the permissions for the file. You can directly select the hidden option in the attributes. In this way, the visiting user will not be able to see it.
I have started a new orchard project and I uncheck Use IIS Express in my Orchard.web property's Web section and change the Project Url to http://localhost/TestOrchard, then I press Create Virtual Directory.
I uploaded some pictures in my Media folder and use it in my homepage.
Everything seems ok when I view it locally.
But when I deploy it to my website, the link pointing to the media file becomes
/TestOrchard/Media/Default/image/mypic.PNG
Since the TestOrchard folder does not exist in the remote server, media files cannot be read and also the media tab on my Admin control panel shows nothing.
The correct url should be /Media/Default/image/mypic.PNG
How do I remove the unwanted TestOrchard/ folder shell?
In the Admin/Settings, you can change your Base Url.
For example, my website's url is http://xxx.xxx.xxx.xxx/index.aspx
If someone enters xxx.xxx.xxx.xxx at browser, the page will show my files in server:
What shouled I config to hide this file-list page?
I think you are looking for disabling directory browsing. You can follow below steps to disable directory browsing in IIS.
Navigate to your application in IIS Manager and select it.
In Features View, double-click Directory Browsing.
In the Actions pane, click Disable if the Directory Browsing feature is enabled.
I use IIS8 and I'm trying to hide web.config from the files list on my site but I just can't seem to find a solution for that. Can you help me please? :)
Right click the file and mark it as hidden. It will stop showing up in IIS directory browsing.
Use the command prompt for each web.config file
attrib +H web.config
You can also do a Find with Windows Explorer and search for "web.config" in the directory where you store all of your web data, then right-click on each one there to enable the Hidden flag as well. With the Find GUI > View options - you can hide already hidden files so you know which ones you've already changed.
I'm trying to display simple HTML files in a folder on my web site. No ASP.NET, no application, just a virtual directory. I'm getting "Access denied" in the browser when I try to open a web page.
This is through a hosting provider; I have access through FTP and IIS Manager only.
Authorization Rules show Allow - All Users - Inherited.
I'm far from an expert on IIS, and most search results either suggest checking folder permissions in the file system (which I have no direct access to) or are relevant to applications.
How can I diagnose this?
More information:
Through trial and error, I found out the cause, and worked around it with URL Rewrite. I'd still like to know why it's happening (the root cause) and how to change IIS's behavior.
I'm moving my site from Linux hosting to Windows hosting. Some of the old URLs are of the form:
http://www.MYSITE/myblog/index.php/2013/04/29/SOMEFILE.html
The ones I'm moving are HTML files, not PHP files, but I tried to mirror the folder structure.
The problem is in the index.php folder name. No matter what I do, even if I enable directory browsing, IIS won't let me access any files in a folder with that name. If I rename the folder (or even the "extension" part), it all works.
I've scanned through many of the IIS settings and haven't found any mention of forbidding a .php extension. What's going on?
You need to add permission for IIS users.Try adding permission to the folder by adding user
IIS_IUSRS and give required permission .
1.Right click on folder, go to properties
2.Go to security tab
3.Click on Edit, if you don't see IIS_IUSRS in the user list who have permission
4.Click on Add , In the box , add IIS_IUSRS and click on check names, it will
get the qualified name .
5.Click OK and apply
Hopefully it should work then
Through trial and error, I found out the cause, and worked around it with URL Rewrite.
For URLs of the form:
http://www.MYSITE/myblog/index.php/2013/04/29/SOMEFILE.html
The problem is in the index.php folder name. IIS won't let me access any files in a folder with that name. If I rename the folder (or even the "extension" part), it all works.
This is reminiscent of Joomla virtual (SEO) URLs. I'm assuming that you don't really have static files at all, but the CMS program running your site parses this information after the "index.php" as parameters for a database query to create the html page on the fly. In this case, the only file that's really being served by the web server is index.php, and the program includes other php files depending on the parameters entered. You're on the right track though, with creating a small file on the destination server and try to load it, but this means the index.php directory structure is moot.