I have just set up a server on my home network to allow testing of a Drupal (Ver 7) development website from several computers. Ubuntu as well as the usual programs (Apache, PHP, MySQL) are installed.

The website, although still not a production site, is also up on a web host and all works well there. I uploaded a copy of all the Drupal files to the new server as well as the database.

Since it's a home based server, the IP of the site is If I enter the www.example.com in the URL, my browser points to the copy of the site on the server of the hosting company.

If I enter, I am taken to the front page of the site on my home server. Everything there displays well. I do not want this new server to be accessible to the public yet.

However if I click, say, on the "request new password" link of the User Login block of the front page, I get a "404 Not Found - The requested URL/user/password was not found on this server" message and the URL reads ""

Ditto with the create new account page and all pages directly accessible to unregistered users such as the About Us page or the Terms of Service Page.

If I try to log into my account (from the front page login block) I am not taken anywhere and remain on the front page.

Now, I do plan to develop this home server to make it accessible from the web in the future but I know I will need a fixed IP address and a DNS that will point to it.

In the mean time, however, how can I have the site work on this new server? It's only for testing purposes at the moment so what shows in the URL is unimportant.

As far as I could see, all folders have a permission of 755. I tried removing the .htaccess file entirely or replacing it with the one provided by a fresh Drupal install, but to no avail.

Any thought or suggestion to make this work?

Thank you. :)


Sam Moore’s picture

Do you have clean urls enabled? Check - if that works, visit and see if you can enable Clean URLs.

Jaypan’s picture

If you cannot enable Clean URLs, then it's likely your .htaccess file did not make the migration, so you will need to either copy it from the original system, or get a new one from a fresh D7 installation.

Checkout my Japan podcasts.
Triumphent’s picture

Yes, I did just that. Copied the .htaccess file from the other site and uploaded it here. But there is no change. :(

Triumphent’s picture

You are indeed onto something., and bring up the appropriate pages.

Unfortunately, I can't go to admin/config/search/clean-urls because I am not logged in. Going to /?q=user/1 takes me to an access denied page. Going to /?q=user/login works but I am taken to a 404 page after logging in.

Before uploading my site, I made a fresh Drupal install to see if all worked well. And it did. So, it doesn't appear the server is at fault.

I see i have more investigating to do, but thank you for putting me on the right track. :)

Triumphent’s picture

A search on this site took me to this page: https://drupal.org/getting-started/clean-urls

It looks like Apache (on the server) needs a special module and additional configuration for clean urls to work with a Drupal installation. I do not remember ever installing this module. So, I am going to start with that and, hopefully, that will solve the issue. :)

Jaypan’s picture

Yes, you need the mod_rewrite module enabled on apache. It's often as simple as opening up your httpd.conf file and uncommenting that line in the file.

Checkout my Japan podcasts.
Sam Moore’s picture

Well lack of this module would definitely be a problem, but if you did a fresh Drupal install on that server and Clean URLs worked, then mod_rewrite must be there.
The next thing I'd look for is to make sure you have AllowOverride All set for the directory that your problem site is in. Without this, .htaccess gets ignored. This is usually set in your httpd.conf or some other Apache config file, most likely in the Virtual Host directive.

Look for something that looks like this:

<Directory /path/to/public_html>
 AllowOverride All Options=ExecCGI,Includes...
//more stuff

Probably your Virtual host settings for your other Drupal install will have a directive you can copy.

Triumphent’s picture

Yes, I changed the AllowOverride None to AllowOverride All in the
/etc/apache2/sites-available/default file and I can now access all the pages (with clean urls) made available to anonymous users.

I still can't pass the logging block or the logging page though, but I guess that's another issue. I probably need to enable some other module in Apache. So, back to the module hunt!

Thank you all for your invaluable help with this. I wouldn't have been able to do it without you. :)

Sam Moore’s picture

You are quite welcome.

For your login problem, you might start with these:

Probably best to open another issue if it continues.