I'm new to Drupal and testing it on my localhost. Apache 2.2, PHP 5.2.4, and MySQL 5.0 are installed. After uncompressing drupal-6.0-rc4.tar.gz to a htdocs\drupal6 directory, localhost/drupal6 shows this:
Index of /drupal6
* Parent Directory
* CHANGELOG.txt
* COPYRIGHT.txt
* INSTALL.mysql.txt
* INSTALL.pgsql.txt
* INSTALL.txt
* LICENSE.txt
* MAINTAINERS.txt
* UPGRADE.txt
* cron.php
* includes/
* index.php
* install.php
* misc/
* modules/
* profiles/
* robots.txt
* scripts/
* sites/
* themes/
* update.php
* xmlrpc.php
I navigated to localhost/drupal6/install.php and drupal installed successfully. However, after install the browser returned to the drupal6 directory listing. Every time click on a link in drupal, it takes me back to the drupal6 directory listing. For example, localhost/drupal6/?q=user/1 just takes me to the directory listing.
Any ideas? Thanks.
Comments
Sounds like a server config
Sounds like a server config issue. Is Apache configured to recognise index.php as a DirectoryIndex file?
If so, maybe check your htaccess configuration.
Re: Sounds like a server config
The .htaccess in the drupal6 directory is the installed configuration file. I don't know what DirectoryIndex does, but here is the snippet from the file:
# Set the default handler.
DirectoryIndex index.php
htaccess
can you verify that you have a .htaccess file? it is probably a "hidden" file. that should have an "Options -Indexes" setting, which i think is supposed to hide the listings.
the other thing is, be sure that index.php is the first item in directoryindex (httpd.conf in apache/conf)
i think.
Re: htaccess
I do have an .htaccess file. It's 113 lines. Here are the first few lines:
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
Order allow,deny
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
httpd.conf file
tm,
in my httpd.conf file, it says:
## DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
Does this seem correct?
Try this: DirectoryIndex
Try this:
DirectoryIndex index.php index.html
Also, you might need to sort out whether this is running as a Virtual Host, and see how that is configured. You need 'AllowOverride All' set for your DocumentRoot directory for htaccess to work. Either that or set it in your main httpd.conf file ... I know, this stuff gets messy to explain pretty quickly.
It works! Yeay!
I changed DirectoryIndex index.php index.html in both httpd.conf and .htaccess and looks like drupal is working. Thanks mickh and tm. You guys are very generous.
-Ido
Thanks a lot
This worked great after 3 days of crazy time!