By shiv_sms on
I recently upgraded apache from 2.2 to 2.4.6 and php to 5.5 on ubuntu 12.04 and clean urls arent working anymore (the ?q=node does work though).
I googled and found links asking me to "AllowOverRide all" which i had already done, and some posts suggested changing the lines in .htaccess from "Order allow,deny" to "Require all granted" or "Require all denied", which also i did.
But still Clean URLS are not working.
Any help is appreciated.
Comments
You should make sure that mod
You should make sure that mod_rewrite is enabled in your server configuration. It is vital when you are using SEF URLs
Regards
mod_rewrite is already
mod_rewrite is already enabled.
Clean URLS were working before the upgrade.
I dont know what else to change.
Any help is appreciated.
Thanx
Is AllowOveride set to 'All'
Is AllowOveride set to 'All' in your VirtualHost ?
*edit* nm just read your question properly..
this is my 000-default.conf
this is my 000-default.conf
ServerAdmin webmaster@localhost
DocumentRoot /var/www
Options FollowSymLinks
AllowOverride All
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all denied
# Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all denied
# Order allow,deny
Allow from all
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
# Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
these are the changes i have
these are the changes i have done in the .htaccess in the drupal root folder
# Order allow,deny
Order deny,allow
Allow from all
Require all granted
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
You probably need 'Order
You probably need 'Order allow,deny' as well as 'Allow from all'
Here's what I use:
He is running Apache 2.4
See https://httpd.apache.org/docs/2.4/upgrading.html for the changes between Apache 2.2 and 2.4
2.2 configuration:
Order allow,deny
Allow from all
2.4 configuration:
Require all granted
Hiking up the Drupal learning developer curve
Loaded Modules
Loaded Modules
core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_unixd mod_access_compat mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_deflate mod_dir mod_env mod_expires mod_filter mod_headers mod_mime prefork mod_negotiation mod_php5 mod_proxy mod_proxy_ajp mod_proxy_balancer mod_proxy_connect mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_reqtimeout mod_rewrite mod_setenvif mod_slotmem_shm mod_status
Had the same problem. Fixed it this way
Add to default host config (000-default.conf) these lines:
Ubuntu 14.04 Apache 2.4.7
I had to setup my virtual directory differently:
## Note: The above code is fictitious. Any resemblance to real or actual working code is purely coincidental.
Apache 2.4.7, Ubuntu 14.04 - 404 error and clean urls
I had made the required changed in /etc/apache2/apache2.conf, namely incorporating AllowOverride All and Require all granted in section.
My first problem was the drupal folder not loading at all and giving a 404 error on localhost/. My mistake was the place my folder on /var/www instead of /var/www/html. As the DocumentRoot in apache 2.4.7 is /var/www/html, the drupal folder needs to go into the html folder.
Now Drupal was loading, but clean urls were not working. Was solved by the guidance in this post, namely by including the following in /etc/apache2/sites-enabled/000-default.conf
Now clean urls are working.
Apache 2.4 + PHP-FPM for Drupal 8
Here you have an excellent HOWTO on configuring Apache 2.4 and php-fpm
https://xdeb.org/node/1613
Just tested tried it, with PHP 7.0 and it works just perfect with clean URLs.
--
DevElCuy