Hi everyone,
I am trying to install Drupal on server but when I try to login it comes up with error message

"The requested URL /project/Drupal6/ was not found on this server".

Anyone have any idea why this happening.

Any help much appreciate

Mero

Comments

cog.rusty’s picture

I guess not without more information.

- Have you already installed Drupal and you can see the front page but you can't login?
- Or doesn't the front page appear at all? If so, what have you done until now, and what can you access?
- Where have you installed Drupal? In a "project/Drupal6" directory under your public web root? What URL are you using to access it? example.com/project/Drupal6?

mero’s picture

Thanks for reply

I have following application running on my laptop:
Apache 2.2
MySQL 5.0
PHP 5.2
Yes, I already install Drupal-6 with Win-XP and its locate on public_php/project folder. Also I can access front page and manage to enter username and password detail but when I press login button it comes up with error message "Not Found -The requested URL /p05022175/project/Drupal6/ was not found on this server." I checked mysql database and it's work fine as well.

I am using my university URL.

Mero

cog.rusty’s picture

The question is why does Drupal look for the /p05022175/project/Drupal6 URL?
Or why does it look for the /project/Drupal6 URL that you mentioned before?

Is any of the above the URL path which appears on your front page? Be specific.
Also, while looking at your front page, hover over the links to see if the links use the same base path as the front page or they change it.

Also make sure that none of those are in your $base_url line in /sites/default/settings.php.
Have you made any changes to your .htaccess file?

mero’s picture

Hello there!

/p05022175/project/Drupal6 - I have installed Drupal 6 on server and this is path/directory. When I installed drupal on the server it managed to create tables on MySQL database successfully. Then it display login page with "Welcome to your new Drupal website!" when I try to login, its give me error msgs:

404 Not Found.
The requested URL /p05022175/project/Drupal6/ was not found on this server.

I haven't changed anything in settings.php or . htaccess.
Do I needs to change # $base_url = 'http://www.example.com'; // NO trailing slash! in settings.php.

Please advise/help since my project deadline is coming up soon and I haven't done any work because I got stuck on installation! Do you know is there any bugs in Drupal 6.0?

Regards: Mero

cog.rusty’s picture

What is the URL path of your front page with the "Welcome" message?

Is it http://example.com/p05022175/project/Drupal6 ? Or what?

mero’s picture

Hello!
We have managed to add “index.htm index.php“ in httpd.conf file on the Apache server


DirectoryIndex index.html index.htm index.php

All working fine, thanks for help and suggestion.
Now real problem is to create new web site!
Mero

cog.rusty’s picture

Oh, I see. Drupal's .htaccess file was probably not working, or else its "DirectoryIndex index.php" line would have taken care of that.

techsheriff’s picture

Hey all!! I'm in a similar situation, getting the Not Found error page.

I've moved my site from the live server to a local MAMP setup; so far the site files have been ftp'd over, database imported and the $db_url string in the settings.php updated in /sites/default. My home page loads perfectly fine, but when I click on a link (any link for that matter!) I get the page not found error:

Not Found

The requested URL /mySite/content/getting-started was not found on this server.
Apache/2.0.59 (Unix) PHP/5.2.6 DAV/2 Server at localhost Port 8888

this happens with any page thats clicked on, including for example /mySite/user.

any ideas anyone?

cheers

cog.rusty’s picture

Try http://example.com:8888/mySite/?q=content/getting-started instead (add a ?q=).

If this works, then your problem is that your local server is not configured for clean URLs. Make sure that you have Drupal's .htaccess file, and that Apache does read that file.

The latter means that Apache's httpd.conf file must *not* contain an AllowOverride None in the Directory section which refers to your web document root. If it does, change it to AllowOverride All and then restart Apache.

Barry_Fisher’s picture

More specifically for me-
Navigate to /etc/apache2/sites-available/default and change AllowOverride None to AllowOverride All
Then restart apache: /etc/init.d/apache2 restart
You should be laughing at this point
Hope that helps someone- I always forget to do this in Ubuntu and it leaves me scratching my head for a little while trying to remember what I had to do. I also have to remember to a2enmod rewrite to get clean urls to work!

--
Barry Fisher

Pivale

sderrick’s picture

Mucho thanks! Been scratching my head for 30 minutes!

Scott

DjebbZ’s picture

Been strugling with this for a few hours, copied the original default Apache conf file with had AllowOverride to None. Thanks !

psliurt’s picture

This solve my problem !
And this way works on the windows 7 32bit platform!

I changed AllowOverride None to AllowOverried All (which is in the httpd.conf)!
Then everything is so beautiful!!!!!!

hoangbien’s picture

Dear you,
I have the same problem. i was tried http://mysite.com:80/mysite/?q=content/abouts-us it not work. I bought a hosting and i don't change Apache's httpd.conf. (hosting server Apache/2.2.3 (CentOS) Server at www.logivac.org Port 80).
How to fix this problem?
Thank you,

Ked’s picture

Started getting this issue after migrating a site to a new server. Amending AllowOveride ALL and restarting Apache worked like a dream.

dorys’s picture

I have just about the same situation. Just moved my live site to local using MAMP. I get the same error:

Not Found

The requested URL /localhost:8888/htdocs/index.php was not found on this server.

I checked Apache's httpd.conf file and it is set to AllowOverride All. I've also added the ?q= to the front of the extension and that worked so apparently Apache is not reading the .htaccess file? Do I have that correct?

Not sure what else to do?

Update:

I was able to finally login and disable clean URLs but I'm still having an issue with enabling clean urls using MAMP. I've started a new post http://drupal.org/node/516584

~d

morpheus0101-1’s picture

Hi there,

I was trying to do the same thing as you and got the same message. After messing around with all day trying all sorts of things I finally managed to solve it! Hope this works for you too:

1.) I logged into my Live Server and turned off clean urls

2.) I then exported the database from the live site and imported it into my local site.

3.) Then kicked my own ass for not doing that 5 hrs ago:)

Good luck

Sue Mildrum’s picture

I have what looks to be the same problem as others in this thread, but I have been unable to resolve it. I moved the directory in which Drupal was installed and now get the behavior that I can view the home page, but all Clean URL versions of the links are broken. If I insert ?q= into the URL the link works. I have checked that httpd.conf looks correct and it does (see below). I have restarted apache.

A little more specifically:
in my htdocs directory I created a directory for a new site:

www.foo.com

I USUALLY install drupal right into that directory so that index.php and other drupal files are in www.foo.com. For whatever reason, in this case I created a subdirectory named "web" and installed drupal there. So index.php and other files are in this directory:

www.foo.com/web

In my conf/http.conf file I had:

Options FollowSymLinks
AllowOverride All

Clean URLs worked fine in this installation.

But I decided that I really didn't like having this one site set up differently from the others. So I did the following:
1) I renamed www.foo.com to www.foo.comold
2) I created a new directory named www.foo.com
3) I copied everything (whole drupal install) from www.foo.comold/web to the new www.foo.com
4) I didn't change anything in http.conf because it already referred to www.foo.com

I got the broken URL errors

5) I restarted apache (sudo apachectl -k restart)

I still got the broken URL errors.
Broken: http://localhost/www.foo.com/about
Works: http://localhost/www.foo.com/?q=about

Any more ideas?

Thanks,
Sue

cog.rusty’s picture

Make sure that Drupal's htaccess file has been copied to the new directory. Check if it contains a RewriteBase /web line left over from the old directory. Check for any other lines which refer to the old directory.

In httpd.conf, what is the <Directory> section containing the settings that you mentioned? Check if its path contains /web. Also, depending on your Apache distribution, there may be an additional site-specific configuration file besides httpd.conf somewhere in a subdirectory, with different settings.

Sue Mildrum’s picture

Thanks for your response, cog.rusty.

I have identical .htaccess files in sites/default/files. There is no reference to RewriteBase in them. They contain:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

In httpd.conf there are more general entries for the parent directory followed by identical entries for the two locations. Note that neither refer to the "/web" directory":

<Directory />
    Options FollowSymLinks
    AllowOverride None 
    Order deny,allow
    Deny from all
</Directory>

<Directory "/opt/local/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None 
    Order allow,deny
    Allow from all
</Directory>

<Directory "/opt/local/apache2/htdocs/www.foo.com">
    Options FollowSymLinks
    AllowOverride All
</Directory>

<Directory "/opt/local/apache2/htdocs/www.foo.comold">
    Options FollowSymLinks
    AllowOverride All
</Directory>

I went back and checked my notes about how I got Clean URLs to work in the first place and I did not have to change any other apache files, so I can't think of any other place I need to look.

I can live with this behaving this way on my localhost, but I'm afraid if I don't figure this out I'll end up with the same problem when I move this site to the hosting company's server and I'd rather learn my lesson locally. :-)

Thanks,
Sue

cog.rusty’s picture

I meant Drupal's main .htaccess file containing the RewriteRule lines that make clean URLs work. Not the small one under "files/". Do you have that?

Sue Mildrum’s picture

Ah! Thanks cog.rusty! That was my problem. The .htaccess file was missing from my new www.foo.com directory.

To fix it, I copied www.foo.comold/web/.htaccess to www.foo.com/.htaccess, restarted apache and the links in www.foo.com worked. I did not need to edit .htaccess as it did not refer to any specific directories:

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

Thanks again for your help.
Sue

kjmawdsley’s picture

Hi guys,

I'm new to this, so please bare with me.
Our site was originally designed by an outside firm using drupal. We decided that we would take over maintenance of the site so I had a bit of a play - I downloaded drupal and mamp, installled, setup a test site and everything worked ok. So we then asked the guys to package up the site and send it over so I could take over.
I have managed to connect the database to mamp but I am having a major headache with clean urls!
I can't access any page without adding ?q= to the url, which means I can't login to the site.
I have had a look around, and I don't quite understand everything I have read, but I have changed AllowOverride None to All - the rewrite_module is loaded, but no joy.
I'm sure it must be something to do with the .htaccess file but here's where it gets tricky - I can't find a drupal install folder in the files they sent over.
The only folder I can find that is called drupal is INSIDE the modules folder.
To add confusion to that, the htaccess file was located in root>modules>fckeditor>fckeditor>editor>filemanager>connectors>py
So I have no idea if this is the htaccess file I need to edit and what I should change I if it is.
Any help would be REALLY appreciated.
If I had any hair, I would be pulling it out right now.

Thanks in advance.

UPDATE:
I have disabled clean urls directly in the database. Still nothing.

Sue Mildrum’s picture

kjmawdsley - I pulled out my hair with Clean URLs too. I tried a bunch of things that didn't work, but ultimately ended up with the following formula which has worked for me.

Note that my Apache server is installed in /opt/local/apache2 so I will use that path to reference specific files. Each of my Drupal installs are in sub-directories of /opt/local/apache2/htdocs. For example:
/opt/local/apache2/htdocs/site1
/opt/local/apache2/htdocs/site2

Edit /opt/local/apache2/conf/httpd.conf. For each site, add the following, replacing "site1" with your site's root directory:

<Directory "/opt/local/apache2/htdocs/site1">
    Options FollowSymLinks
    AllowOverride All
</Directory>

Edit /opt/local/apache2/htdocs/site1/sites/default/files/.htaccess. It should contain the following:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

Restart apache:
sudo apachectl -k restart

That ought to do it.
Sue

therobyouknow’s picture

Some good answers here - Also:

There may also be another file with your Apache (or equivalent compatible) server setup - vhosts.conf

I already had AllowOverride All in httpd.conf set but need to ensure this in vhosts.conf

Once I did this, Apache then looked at .htaccess before these above settings it was ignoring it (I proved this by renaming/moving .htaccess)

I had this problem when I was importing a website to my localhost development setup based on a WAMP stack, ZWAMP.

Make sure that AllowOverride All is set anywhere that AllowOverride occurs in a directive.

Check your Apache error_log file, this will give some clues through error messages.

AlexBorsody’s picture

make sure you have mod_rewrite enabled in MAMP for clean urls to work

==============================================
check me out at http://freeenergymedia.com

ayushjn’s picture

Hi F.E.M.,
Thanks for this. I almost forget to do this every time I perform a new development instance creation in my system.

pino lapino’s picture

M'y URL notre responsabilités

onlinkall’s picture

you can make sure only is it you .htaccess is insuide the folder publica html folder just make sure if not upload it to there and it will work

if it is there you can try

Requested URL not found on the server or more specifically, error code 404 means that the URL which we are trying to open was not found in the server and therefore cannot be opened. This could possibly mean there is a problem with Drupal installation or it’s configuration.

The first thing which we might need to do in order to troubleshoot this issue is to check whether it’s being caused by some faulty directive in .htaccess file. The best would be just to rename .htaccess file to something like htaccess and check if we are able to access website. If it’s opening without 404 error, this means we have a problem in .htaccess file. To find out which exactly directive have caused this issue, we might need to go through every line of .htaccess file and comment them one by one and checking website for any errors.

But if it’s not related to .htaccess file, one of the trusted methods in resolving such problem is to edit file “settings.php”. More specifically, find a line with a variable “$base_url” and uncomment it. Also, make sure to set it’s value to Drupal installation URL. In most cases it should help to get away from 404 error message when trying to access the website.

@lucifer’s picture

i have a drupal 6 multisite ,i just created symbolic link for that. home page appears ,but on clicking any link it give NOT FOUND error

arunkumark’s picture

Hi,
Missing .htaccess file may arise 404 problems. The same problem on server tries to set up the production site in development. The problem was a .htaccess file not exist in my root directory of Drupal. I copied .htaccess file from a fresh Drupal package and placed in root directory site working properly.