Apache 2 & OSX 10.5 - Stop Directory Indexing

Hi,
I'm running a home-based web server on 10.5 and by default directory indexing seems to be on. That is, if you hit a directory on the web server with no index page in it then Apache returns a list of the files in the directory. I'd like to turn this off but don't know how.
I think this used to be called fancy indexing under Apache 1.2 and there was an option for this, but in my private/etc/apache2/httpd.conf file this option no longer exists. An ideas?
Many thanks,
Pat

You'll have to edit /etc/apache2/httpd.conf in the text editor of your choice. Assuming "path/to/WebserverDirectory" is where you want to turn indexing off, add the lines
<Directory "path/to/WebserverDirectory">
Options -Indexes
</Directory>
Every subdirectory will have indexing turned off. You can enable indexing for subdirectories with
<Directory "path/to/WebserverDirectory/subdirectory">
Options Indexes
</Directory>
When you're done editing, save your changes and turn Web Sharing (in the System Preference) off and then back on. Make sure to empty your caches when reloading in your web browser.

Similar Messages

  • Apache giving a Directory index forbidden by rule: /Users/me/Music/iTune

    I am trying to configure Apache to display my iTunes folders so that I can download them to my Playstation 3. The Playstation 3 either gives me a network error, or a "Directory index forbidden by rule: /Users/me/Music/iTunes/" in Apache. The network error on the PS3 seems to occur when Bonjour (?) rewrites the system name (I have entered the IP address) to "george-smiths-computer.local", since the playstation 3 doesn't know how to find this address.
    My rules in httpd.conf seem to be OK, so the second Directory error doesn't make sense:
    Alias /iTunes/ "/Users/me/Music/iTunes/"
    <Directory "/Users/me/Music/iTunes/">
    Options +Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    If I put index.html in the directory apache will find and display it, but still no directory index.
    I have a workaround by copying the files to /usr/share/httpd/icons, which DOES show the index:
    <Directory "/usr/share/httpd/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    Does anyone have any suggestions?
    Thanks!
    Dave

    Hi--
    Welcome to the Apple Discussions.
    I played around with Apache and came up with a couple of things to look at. I can get it to give me the Hi--
    Welcome to the Apple Discussions.
    I played around with Apache and came up with a couple of things to look at. I can get it to give me the Directory index forbidden by rule: /Users/me/Music/iTunes/ error in the log if I mess up the Directory block by forgetting to put a quotation mark at the head of the block:
    <Directory /Users/charlie/Music/iTunes/">
    Also, I can get Apache to show me the 403 error if I have the case wrong on a directory in the path. In other words, if I did "Me" instead of "me" (assuming the home directory really is "me", I get a 403 error. But, strangely enough, it doesn't log it in the error log. So take a real close look at your paths in that directive (I'm assuming you didn't just copy and paste them out, since "me" seems like an unlikely user name).
    The "redirect" to the Bonjour name is more likely a result of content negotiation. I'd guess you're asking for the directory without a trailing "/" character. When that happens, Apache does a redirect to the same directory, but adds the trailing "/". You should be able to get around this by always specifying the "/" in the URL. You might also want to look in the Apache Docs at both the ServerName and UseCanonicalName directives.
    For example, if you don't care about redirects always working sensibly from outside your network (i.e., the Internet), you could always set the ServerName directive to the IP address of your server inside the LAN. And you could turn off UseCanonicalName, too. That would keep it from trying to use the Bonjour name to construct URLs in situations where it does these redirects.
    charlie
    P.S.--Make sure you back up your http.conf file before you do a lot of hacking at it, just in case. You can always copy in the default, but it's a hassle if you've already done some successful customization...

  • Directory index forbidden.

    hi folks,
    i want u r help,my clint is using Apache and tomcat both the webservers my wars are deployed on those mechines.in my place it was working fine with the same wars and required settings are made on client mechine also(related to programming).but its giving an error like this while i am checking their Error_log files.
    "Directory index forbidden by rule"
    Thanks & Regards
    prasad.sistla

    Are you running Apache?
    Try checking your
    Options -indexes
    value.
    If you have that set, try setting it to
    Options All
    Check this site for more info
    httpd.apache.org/docs/1.3/mod/core.html
    Hope it works!

  • How do I stop the indexing on my MacBook Pro? It's been indexing for 2 days.

    How do I stop the indexing on my MacBook Pro? It's been indexing for 2 days.

    Step 1
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Triple-click anywhere in the line below on this page to select it:
    syslog -F '$Time $Message' -k Sender mdworker -o -k Message Rne Norm -k Sender mds | tail | pbcopy
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign ($) to appear.
    The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message. 
    The Terminal window doesn't show the output. Please don't copy anything from there.
    If any personal information appears in the output, anonymize before posting, but don’t remove the context.
    Step 2
    Enter the following command as in Step 1 and post the output:
    mdutil -as 2>&- | pbcopy
    You can then quit Terminal.
    Step 3
    Launch the Console application in the same way you launched Terminal. In the Console window, look under the heading DIAGNOSTIC AND USAGE INFORMATION on the left for crash reports related to Spotlight. If you don't see that heading, select
              View ▹ Show Log List
    from the menu bar. A Spotlight crash report has a name beginning in "mds" or "mdworker" and ending in ".crash". Select the most recent such report, if any, from the System and User subcategories and post the entire contents—the text, please, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post any other kind of diagnostic report, such as hang logs—they're very long and not helpful.

  • Default page when no directory indexing

    Hi,
    I disabled directory indexing on the appserver. But now, for subdirectories of the docroot just a plain white page is displayed. Is it possible to have a custom page shown there?
    If so, how?
    Grtz

    I've been searching for weeks for a way to turn off directory indexing! How did you do it?
    thanks!
    Cedar

  • Apache/CentOS--error: attempt to invoke directory as script. Please help.

    I am running CentOS 4.5 with kernel 2.6.9-55.EL and Apache 2.0.52.
    When I am typing http://linxdell.systems.com to execute index.cgi, I am getting:
    Forbidden
    You don't have permission to access / on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request
    In the error_log I found:
    attempt to invoke directory as script: /var/www/htdocs/
    But if I type http://linxdell.systems.com/index.cgi, it works fine.
    Below is some of my httpd.conf:
    DocumentRoot "/var/www/htdocs"
    <Directory />
    Options FollowSymLinks ExecCGI Indexes
    AllowOverride All
    </Directory>
    <Directory "/var/www/htdocs">
    Options Indexes FollowSymLinks All Multiviews ExecCGI
    SetHandler cgi-script
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    DirectoryIndex generate_page.pl index.html index.htm index.cgi
    ScriptAlias /cgi-bin "/var/www/cgi-bin" (also tried with Alias)
    <Directory "/var/www/cgi-bin">
    AllowOverride All
    SetHandler cgi-script
    Options ExecCGI Indexes
    Allow from all
    </Directory>
    I will really appreciate any help to solve this problem.
    Thanks.

    Hi,
    This is a example for your case:
    <Directory "/var/www/html">
    Options Indexes FollowSymLinks +ExecCGI
    AddHandler cgi-script .cgi .pl .sh
    Order allow,deny
    Allow from all
    </Directory>
    1. add "Options: +ExecCGI"
    2. add "AddHandler cgi-script .cgi .pl .sh"
    Details refer to:
    http://httpd.apache.org/docs/2.0/howto/cgi.html
    Best Regards,
    Sipingal

  • Join OSX machine to Active Directory

    Hi,
    I'm trying to join all the OSX machine we use in my company, to 2008 R2 domain controller. We don't use Open Directory, at the moment.
    From the guides I read on the net, I need to extend the AD schema, with the Open Directory attributes. Since we don't use OD at the moment, do I need to install OSX Server on a machine, and do this operation, or I can skip this step? Do you know if I can download the additional attributes from somewhere else?
    Thanks

    Ah, what? Do you want to join the machines to the domain or do you want to manage the machines from the domain?
    If you are looking to just bind and benefit from the built in support for authentication, authorization, and password policy, then just join your Macs to AD and you are done. (one tip... Login the first time and then log out immediately. Then log in the second time and start using single sign on services).
    Now, if you are looking to manage the machines in AD, then yes, you will need to extend schema. Apple will provide the schema extension scripts to you if you find the right person. However there is this document that suggest you have an OS X Server running. http://images.apple.com/business/solutions/it/docs/Modifyingthe_Active_DirectorySchema.pdf
    But read here for an alt method http://ewall.org/index.php?name=News&file=article&sid=347
    Other alternatives include Centrify or the magic triangle in which you leave AD alone (highly recommended) and use an OS X Server to manage the Macs.
    What is your end goal? I find most customers want the basics that come with OS X's built in AD plugin. Schema modification sends shivers up my spine since I am never the one managing the AD environment and I don't want to cause a fellow IT professional heartache. Post deployment management is commonly handled with ARD and building a well thought out master system image addresses most management issues.
    Hope this helps

  • Is there a file in which OSX stores the home directory path, where to find it and how to edit it in Windows 7?

    Hi everyone,
    I have a SSD with the System and Apps on it, and another HDD containing the home directory.
    I made the mistake to rename the Volume the home directory is on whilst being logged in, the system reacted accordingly and prompted some Password requests,
    and I then tried to choose the newly named Volume in the Advanced options dialogue in Users & Groups (example seen below).
    I tried to change the name back to what it was in the hope of it all being back to normal again, but instead it's completely messed up now and I cannot login anymore (prompt: "You are unable to log in to the user account "xxxx" at this time. Logging in to the account failed because an error occurred")
    All I can do now is boot my Windows 7 and try to fix this from there, I can read/write the OSX Volumes thanks to MacDrive.
    So now the big question is:
    IS THERE A FILE containing the path to the home directory (red arrow)?
    IF SO, WHERE can I find it?
    And is there a way to edit it in Windows?
    My guess is that if I rename the Volume, AND change this path to something identical again, it might solve the issue.
    Thanks!

    Download THIS
     Cheers, Tom

  • Confirmation on How to Stop Spotlight Indexing an External Hard Drive

    Hello everyone,
    I know there are a number of posts on this but I just want to confirm: Can I stop Spotlight from indexing my external FireWire hard drive by adding its name to the Privacy pane in Spotlight's preferences when the drive is mounted? (I'm a little low on internal hard disk space on my iBook so I want to keep the index as lean as possible.)

    Georgy
    Keep in mind that the index is stored on the drive that is being indexed. As such, indexing an external volume does not affect your main drive.
    Remember also, that when you do update your external drive, the indexing only updates the changes made to the drive on the fly, provided of course if it is mounted and allowed to do so.
    My suggestion, let Spotlight index the drive. Particularly if you are using it as a backup. Once in place, updating the index and searching is extremely fast.
    Be careful however, of using third-party solutions. Some will affect Spotlight's normal indexing process and their preferences have to be changed for Spotlight to work.

  • Trying to limit a user on OSX Server to one directory for FTP

    Hey there everybody,
    I'm trying to set up a client FTP for a new mac mini running OSX Server (Mavericks). FTP is enabled and I am able to get and put files but, the server is going to be used for a client services company and we will need to use it to transfer files back and forth without allowing access to the whole machine. The core issue is when I FTP in as a user I can still move around and see folders and files. I would like to create a user that can only see one folder or directory and only get / put files to that one place. Can't seem to find any similar posts, though I would assume this is fairly common.
    Huge thanks in advance!

    Hello again,
    I have tried sending messages from my webmail account in another domain and get the following reply:
    This is the Postfix program at host www.patrickwgill.com.
    I'm sorry to have to inform you that the message returned
    below could not be delivered to one or more destinations.
    For further assistance, please send mail to <postmaster>
    If you do so, please include this problem report. You can
    delete your own text from the message returned below.
    The Postfix program
    <[email protected]>: Command time limit exceeded:
    "/usr/bin/cyrus/bin/deliver"
    Reporting-MTA: dns; www.patrickwgill.com
    Arrival-Date: Sun, 8 Jan 2006 14:05:25 -0500 (EST)
    Final-Recipient: rfc822; [email protected]
    Action: failed
    Status: 5.0.0
    Diagnostic-Code: X-Postfix; Command time limit exceeded:
    "/usr/bin/cyrus/bin/deliver"
    So, it appears to be just hanging for some reason and timing out. Any ideas? I really appreciate your help.

  • How to stop spotlight indexing?

    When I start working in the morning the iMac is slow due to spotlight indexing.
    How do I stop this until later that day?

    When you see a beachball cursor or the slowness is especially bad, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Unable to Start/Stop Directory server from console

    We have two Directory Server 5.2 installations with both running as masters with replication between them. One of them was installed with the admin server and the other without. On the one that was installed without the admin server we added it afterwards.
    We now find that on the one that had the admin server installed after the directory server that we cannot start/stop the directory server from the server console nor can we view or access backups or logs from the console. The system does however create the log and backup files and we can start/stop it from the command line.
    I read in a post somewhere that the admin server can be created with a different user from the directory server or with the same username but a different domain and wondered if that was the problem but have looked through the configuration files on both machines and haven't managed to spot a discrepancy.
    Does anyone have any ideas where and what to check?
    Thanks in advance.
    Peter

    Ah, I wouldn't have recognized this scenario if you didn't report the scrozzled user name. The "access denied" error happens for the simple reason that 'IAyjcJlYKL' is not a valid user in your domain. Fancy that. If you look in your config.xml for the "node-manager-username" element, you may find the value is encrypted, and probably is 'IAyjcJlYKL'.
    It might be best if you filed a support case for this. I can make some guesses about what you should do, but it's just a guess. In any case, if you try fixing something, make a backup of the file first.
    The two things you can try doing are (backup the files and shut down everything first):
    * Edit the nm_password.properties file, replacing the one "hashed" line with two lines, setting the "username" property and the "password" property, both in cleartext. When the nodemanager starts up, it will replace those two lines with the "hashed" value.
    * Edit the config.xml file, replacing the values in the "node-manager-username" and "node-manager-password-encrypted" elements with their cleartext versions.
    Then start up the nodemanager and server.
    I'm familiar with this because I saw this happen, and I'm trying to remember the strange thing we had to do. I worked this out with BEA support a while ago. If it helps, my case number was #796710.

  • Apache serving bin files instead of default index

    I was trying to set up Postfix and Mailman today, and I seem to have broken Apache in the process. I installed Postfix and Mailman as in the wiki, but after configuration of Mailman I tried accessing the web server, and the server gave me a bin file instead of the home page. I assumed something in my configuration messed things up, so I deleted all configuration for both Postfix and Mailman, removed the packages, and restarted Apache. However, it is still giving me bin files when I access my Apache sites I had set up previously, so something is still around.
    For additional details, I do get the correct file if I give it the full path. So, vhost.domain.com/index.php and domain.com/index.php work just fine, but just host.domain.com or domain.com does not work properly. I also get the correct results for any subdomains I do not have configured as a virtual host in Apache. So abc.domain.com, aaa.domain.com, etc all work fine. Everything also works properly if I access the server through my internet or local network IP address, so it definitely seems to be an Apache host configuration issue.
    The Mailman configuration does have the line ScriptAlias / "/usr/lib/mailman/cgi-bin/listinfo", so maybe that broke the root somehow, but I assumed removing the configuration and restarting everything would get rid of that.
    Does anyone know what I should check to figure out why Apache is processing a bin file instead of giving me the index.php file in /srv/http?

    So it seems that it is now working. I restarted my computer fully so I guess something was being held and wasn't cleaned up properly by restarting Apache.

  • What's up with tab stops for index?

    Hey,
    Basically, I want my index to have dots before the numbers. Pretty standard: Words, blah bla.........8.
    After reading the following page, I thought I understood how to format my index. Makes logical sense.
    http://help.adobe.com/en_US/FrameMaker/9.0/Using/WSd817046a44e105e21e63e3d11ab7f7561e-7f65 .html
    I got it to work for a minute, and then the dots disappeared, and I'm at a loss. Can't get them back, despite starting from scratch.
    On my Ref pages I have:
    ................... 1, 2–3
        ................. Level2IX
    The above paragraphs are formatted as Level1IX, and Level2IX, respectively, on the Ref Pages. When I go to the body pages and click on the text it seems that the correct info is in the Paragraph Designer, BUT NO DOTS or tabs come up.
    Is there something I'm missing? I don't get why this can be so tricky? (Sorry, I'm a little frustrated at this point).
    (By the way, I do hit Apply and then Update All on the Ref Pages, in the Paragraph Designer.)
    Thanks,
    Ian

    Iangull249 wrote:
    Hey,
    Basically, I want my index to have dots before the numbers. Pretty standard: Words, blah bla.........8.
    After reading the following page, I thought I understood how to format my index. Makes logical sense.
    http://help.adobe.com/en_US/FrameMaker/9.0/Using/WSd817046a44e105e21e6 3e3d11ab7f7561e-7f65.html
    I got it to work for a minute, and then the dots disappeared, and I'm at a loss. Can't get them back, despite starting from scratch.
    On my Ref pages I have:
    ................... 1, 2–3
        ................. Level2IX
    The above paragraphs are formatted as Level1IX, and Level2IX, respectively, on the Ref Pages. When I go to the body pages and click on the text it seems that the correct info is in the Paragraph Designer, BUT NO DOTS or tabs come up.
    Is there something I'm missing? I don't get why this can be so tricky? (Sorry, I'm a little frustrated at this point).
    (By the way, I do hit Apply and then Update All on the Ref Pages, in the Paragraph Designer.)
    Thanks,
    Ian
    The problem may be just one of those "well, that's how it works" things, or it may be something else.
    I'm thinking of the problem that affects tabs and tab stops, when the width of the generated list's text frame on the body page is narrower than the generated list's specification text frame on the reference page.
    FrameMaker's tab stops are "absolute," unlike almost every other tab stop you've seen; those are "relative." In FrameMaker-ese this means that the first (leftmost) tab character is absolutely connected to the first (leftmost) tab stop in the paragraph's format, and, naturally, the second goes with the second, etc.
    If you type a tab character, it tried to go to the tab stop it's connected to. So, if the first tab character you type in the first line of a paragraph is to the left of the first tab stop, the text jumps to that tab stop, and you keep typing. The second tab character you type tries to go to the second tab stop, and so on.
    However, if the typing has passed (gone to the right of) its tab stop, unlike relative tab behavior which goes to the next available tab stop, in FrameMaker that tab is dead. It's a zero-width lurker. If you type a second tab character at the same place as the dead first tab character, if the second tab stop is to the right of this tab character, the typing will jump to the tab stop, and so on.
    Well, suppose you create a right-aligned tab stop at a fixed position on the line, say 6.5", about where the default reference page text frame ends, and you define the rest of its paragraph properties as you like, you'll expect everything on the body page created by generating a list or index from that reference page. Good thinking. But NOOOOOOOOOT necessarily true. If the main text frame in the generated list or index document has been narrowed, that right-aligned tab stop will be outside the margin, and stuff will act silly.
    Moral: it's always a good idea to define tab stop positions in the exact text frame where they will appear. Usually, there's no problem, except when the paragraphs are defined in the text frame on the reference page. It's not always the same width as the document page on which it places generated text.
    If this isn't the problem, I'm out of ideas. Probably something that's easier to explain<G>.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Does Apache in 10.6 support Web directory protection using .htpasswd?

    I am trying to protect a directory on my mac os 10.6 Web Sharing server using .htpasswd to no avail. I am creating an .htaccess and an .htpasswd file in the directory with what I think are proper configurations. Has anyone done this successfully? Am I missing something? Does the default setup in Snow Leopard allow for this? Is there a better way? Are these too many questions in a row?

    It was my understanding that one creates the .htpasswd file inside the directory that one is protecting, no?
    You can do that, but it's hardly recommended. Ideally the password file should be completely outside of the web directory since that makes it harder for someone to get access to it. If it's anywhere in the web directory tree then there's a chance that a remote user could get access to it (via some as-yet-unknown web server compromise) and there go all your passwords.
    .htaccess has to be in the directory it relates to, but .htpasswd can (and should) be elsewhere.
    and then created an .htaccess file alongside it with the entry shown in my original post.
    Sure, but that .htaccess file includes the path to the .htpasswd file to use for authentication.
    Just edit that line to the full path to your .htpasswd file.
    I'm not sure but I don't even see sever logs where I expected at:
    /private/var/log/httpd/access_log
    Under Apache 2 the logs are in /var/log/apache2/
    Also it appears that there are two apache2 folders:
    /etc/apache2/
    /private/etc/apache2/
    It doesn't matter. /etc is really a symlink to /private/etc. It's there mostly for compatiblity with unix apps that expect /etc.

Maybe you are looking for