Can not access sub directories of my web server
Results 1 to 10 of 10

Thread: Can not access sub directories of my web server

  1. #1
    Senior Member
    Join Date
    Apr 2007
    Posts
    185

    Can not access sub directories of my web server

    http://screencast.com/t/212t3ANINqk

    http://screencast.com/t/iDS7APYYsa


    I provided a screencast that demostrats what I am talking about. there are index.php files in each directory. But the server is not allowing me to go inside the directory. instead the server is sending me back a file named after my subdirectories instead of opening up the directory and showing the index.php files within. inside of my httpd.conf file I have the following added

    Code:
    DefaultType text/plain
    <IfModule mime_module>
        #
        # TypesConfig points to the file containing the list of mappings from
        # filename extension to MIME-type.
        #
        TypesConfig conf/mime.types
    
        #
        # AddType allows you to add to or override the MIME configuration
        # file specified in TypesConfig for specific file types.
        #
        AddType application/x-gzip .tgz
        #
        # AddEncoding allows you to have certain browsers uncompress
        # information on the fly. Note: Not all browsers support this.
        #
        AddEncoding x-compress .Z
        AddEncoding x-gzip .gz .tgz
        #
        # If the AddEncoding directives above are commented-out, then you
        # probably should define those extensions to indicate media types:
        #
    	AddType application/x-httpd-php .php
    	AddType application/x-httpd-php .phtml
    	AddType application/x-httpd-php .php3
    	AddType application/x-httpd-php .php4
    	AddType application/x-httpd-php .html
    	AddType application/x-httpd-php-source .phps
        #
        # AddHandler allows you to map certain file extensions to "handlers":
        # actions unrelated to filetype. These can be either built into the server
        # or added with the Action directive (see below)
        #
        # To use CGI scripts outside of ScriptAliased directories:
        # (You will also need to add "ExecCGI" to the "Options" directive.)
        #
        AddHandler cgi-script .cgi
    
        # For type maps (negotiated resources):
        AddHandler type-map var
    
        #
        # Filters allow you to process content before it is sent to the client.
        #
        # To parse .shtml files for server-side includes (SSI):
        # (You will also need to add "Includes" to the "Options" directive.)
        #
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
    </IfModule>
    
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    #MIMEMagicFile conf/magic
    
    #
    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    #
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    #
    
    #
    # MaxRanges: Maximum number of Ranges in a request before
    # returning the entire resource, or one of the special
    # values 'default', 'none' or 'unlimited'.
    # Default setting is to accept 200 Ranges.
    #MaxRanges unlimited
    
    #
    # EnableMMAP and EnableSendfile: On systems that support it, 
    # memory-mapping or the sendfile syscall is used to deliver
    # files.  This usually improves server performance, but must
    # be turned off when serving from networked-mounted 
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    #
    #EnableMMAP off
    #EnableSendfile off
    
    # Supplemental configuration
    #
    # The configuration files in the conf/extra/ directory can be 
    # included to add extra features or to modify the default configuration of 
    # the server, or you may simply copy their contents here and change as 
    # necessary.
    
    # Server-pool management (MPM specific)
    #Include conf/extra/httpd-mpm.conf
    
    # Multi-language error messages
    #Include conf/extra/httpd-multilang-errordoc.conf
    
    # Fancy directory listings
    #Include conf/extra/httpd-autoindex.conf
    
    # Language settings
    #Include conf/extra/httpd-languages.conf
    
    # User home directories
    #Include conf/extra/httpd-userdir.conf
    
    # Real-time info on requests and configuration
    #Include conf/extra/httpd-info.conf
    
    # Virtual hosts
    #Include conf/extra/httpd-vhosts.conf
    
    # Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf
    
    # Distributed authoring and versioning (WebDAV)
    #Include conf/extra/httpd-dav.conf
    
    # Various default settings
    #Include conf/extra/httpd-default.conf
    
    # Secure (SSL/TLS) connections
    #Include conf/extra/httpd-ssl.conf
    #
    # Note: The following must must be present to support
    #       starting without SSL on platforms with no /dev/random equivalent
    #       but a statically compiled-in mod_ssl.
    #
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
    Last edited by numerical25; 11-01-2012 at 06:12 PM.

  2. #2
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,623
    What is "DirectoryIndex" set to?

    Do you have an "AddHandler" directive?
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  3. #3
    Senior Member
    Join Date
    Apr 2007
    Posts
    185
    Hey dalecosp, I appreciate the response. here it is
    Code:
    #
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    #
    <IfModule dir_module>
        DirectoryIndex index.php index.html
    </IfModule>
    and this is what I could find on AddHandlers

    Code:
    AddHandler cgi-script .cgi

  4. #4
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,623
    I'd suggest adding this to httpd.conf, restarting Apache and seeing if your problem is fixed:

    Code:
    AddHandler application/x-httpd-php  .php
    Good luck!
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  5. #5
    Senior Member
    Join Date
    Apr 2007
    Posts
    185
    I thought that was it. but its still doing it ! I have to get this set up for work. not looking good lol. Here is what I change'

    Before
    Code:
        AddHandler cgi-script .cgi
    after
    Code:
        AddHandler cgi-script .cgi
        AddHandler application/x-httpd-php .php
    and i restarted apache several times.
    Last edited by numerical25; 11-02-2012 at 09:42 AM.

  6. #6
    Senior Member
    Join Date
    Apr 2007
    Posts
    185
    [EDIT]
    Notice in the video that it downloads the directory, or atleast names the file after the directory i try to click on. seems as if it completely ignores the contents of the directory cause the file is very small

    I also have this set

    Code:
    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>
    Last edited by numerical25; 11-02-2012 at 10:24 AM.

  7. #7
    Senior Member
    Join Date
    Apr 2007
    Posts
    185
    figured it out. when i copied the files over. it wasnt the physical files. it was the reference to the files. like shortcuts. i actually loaded the files and it worked. thanks

  8. #8
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,623
    Gotta watch these d***ed new OSen. If your FTP program/File Explorer what-not doesn't show you file extensions, now would be a Real Good Time(tm) to turn that blasted feature OFF
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  9. #9
    Junior Member
    Join Date
    Nov 2012
    Posts
    3
    did the problem sort out it seems to be http conf settings problem

  10. #10
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,623
    Quote Originally Posted by numerical25 View Post
    figured it out. when i copied the files over. it wasnt the physical files. it was the reference to the files. like shortcuts. i actually loaded the files and it worked. thanks
    Quote Originally Posted by nancy30 View Post
    did the problem sort out it seems to be http conf settings problem
    Umm, yes, apparently it did? Numerical25, if you would, please, mark this thread RESOLVED under "Thread Tools" near the top of the page.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •