I installed drupal for the first time the last couple of days.
I chose 8.0-alpha4.
I am on an Ubuntu Linux 12.04 PreceisePangolin machine.
I have Apache, MySQL and PHP5 installed as well.
I fumbled my way through the entire installation, and got to the
success page where it says:
"Drupal installation complete. Visit your new site."
I click on that link, which is:
http://localhost:2345/drupal/
(side note: I have an ssh tunnel going from my local machine port 2345 to my remote Linux machine in cyberspace at port 80)
and I get the Drupal "Welcome to localhost" page.
(and I am logged in automajically as "admin")
So far so good.
But then, no matter what I click, I get the "Not Found" message:
For example:
If I click on the Menu-->Content link, which maps to http://localhost:2345/drupal/admin/content,
I get a page with this:
Not Found
The requested URL /drupal/admin/content was not found on this server.
If I click on "logout", I get:
Not Found
The requested URL /drupal/user/logout was not found on this server.
So on and so forth.
The solution must be simple...
Comments
I did 3 things to get the
I did 3 things to get the basics to work.
1.)
I edited these 2 files:
/etc/apache2/sites-available/default
/etc/apache2/sites-available/default-ssl
In the first 2 blocks, for "/" and "/var/www/", I changed the line of:
AllowOverride None
To:
AllowOverride All
2.)
I installed the "rewrite_module" for apache by running this command:
$ sudo a2enmod rewrite
Enabling module rewrite.
$
I test to see if this is true by running:
$ sudo apache2ctl -M | grep -i write
rewrite_module (shared)
$
3.)
Then restart apache2 via:
$ sudo service apache2 restart;
$
I can now browse to the most basic pages of the drupal home page.
P.S.:
This link helped:
https://help.ubuntu.com/community/EnablingUseOfApacheHtaccessFiles
and another suggestion of typing junk into /var/www/drupal/.htaccess.
If I didn't get a basic parsing error or "Internal Server Error" for apache loading the .htaccess file, then that proved that apache was not loading up the .htaccess files and I needed to continue troubleshooting until I got the parsing errors.
The requested URL was not found on this server
Thanks a lot!
Many thanks
This was very useful, many thanks!
Thanks a lot!
After checking my apache2/sites-available folder I noticed that I only had 000-default.conf, default-ssl.conf and no default.conf file.
So firstly I created that by using : cp 000-default.conf default.conf and then I followed these two steps of your solution :
1. sudo a2enmod rewrite
2. sudo service apache2 restart
So, thank you for your help as your post solved my problem!
thanks a lot!
hey, this approach solved my problem but i did not understand what exactly is happening in the background.
could you please breakdown the steps and explain why we are firing those commands and how they are resolving the error? also why am i getting this error ?
Great tips
I'm new at Drupal, have installed both Drupal 7 and Drupal 8 on my linux machine for learning.
Drupal 7 by default works as it should but Drupal 8 returned the above error and this solution works.
Thanks very much
I am using Amazon Linux and cannot find the file.
I am using Amazon Linux and my situation is exactly like yours, but as for your solution...I cannot locate the: /etc/apache2/sites-available/default and the
/etc/apache2/sites-available/default-ssl files as I cannot find the apache2 directory. I've looked everywhere and I get the same screen error when I click on any of the management links...The requested URL /admin/content was not found on this server.
Do you think I should close down the instance and use a different server? Such as Ubuntu?
Thanks a lot!!
This was very useful!
In my install was this error
mod rewrite was on and i solved this by upload missing .httacess because it is missing in tar.gz install pack,i get this from zip pack.
This should be submitted as a bug
I ran into the problem with .htaccess being missing and preventing Clean URLs from working. I uploaded the Drupal files using Cyberduck but didn't know there were hidden files in the folder.
My question is, why does Drupal try to send you back to Clean URL /admin/content after saving a piece of content, when Clean URLs are not enabled?
It would be helpful to add a message explaining what's wrong and how to fix it, rather than letting the user see a 404 page.
This worked for me in Ubuntu LTS 16
UBUNTU SPECIFIC (YMMV)
1. Enable web server rewrite functionality
2. Edit the appropriate file in your apache2 setup, for the domain in question
....add this stanza before the tag for the relevant website....
3. Restart apache2
Thanks Graham Leach, just
Thanks Graham Leach, just installed live site on local host had error as above, your advice solved problem.
i try it
hello Sir i try the same steps but its not working for me ... can you please help me out how to solve it
Graham Leach - Thank you
I was having this issue and after search for a while your answer was what helped me. Thank you
how you slove
hello Sir how you solve this problem please can you help me out
Thank you, Graham Leach, This
Thank you, Graham Leach, This works for me.
add the following to the
<Directory /var/www/html/yourProjctRootDirectory >
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
This solved my issue
Thanks
/etc/apache2/apache2.conf
After installing Drupal 8 to a "drupal/" subdirectory in my docroot using Linux Mint 19, I too can confirm the need to add what @berramou suggested to "/etc/apache2/apache2.conf" following the usual Apache restart in order to coax the login, contact, and search (etc.) pages to be found. I am new to Drupal and this was a showstopper for me before I learned this solution.
Looks to work
I am using Apache2 on ubuntu 18 platform, Drupal 7.67 works post installation without errors but Drupal 8.7.7 throws the same issue. It was resolved by above config.
Thanks