I am trying to set up a local server to try out drupal 8.1.3 and so far I was able to set up my profile and website but I cannot go to any pages other than the first page. (Welcome page, front page)
I have used the following link to install Drupal:
https://www.howtoforge.com/tutorial/how-to-install-drupal_8-with-apache-and-ssl-on-ubuntu-15-10/
Few things to note:
- I'm not sure if I have CleanURL, tried to fix this issue but couldn't succeed I believe.
- I have tried multiple different approaches to fix issues like CleanURL, SSL connection, Apache2 (AllowOverride All) etc
- I tried adding "?q=" and while this doesn't make the page crash, it just directs me back to the front page
Currently, I am playing around with four files to try to figure out my problem: ".htaccess", "apache2.conf", "drupal.conf" and "settings.php"
I want to be able to access the Drupal tools to modify the website and run it locally, I simply want to test Drupal, I wanted to share this because it may simplify the solution.
Some of the code that I have added while trying to fix my situation:
drupal.conf:
<Directory "/var/www/drupal">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
apache2.conf:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
.htaccess:
RewriteBase /
# homepage redirect
RewriteRule ^$ /SUBDIRECTORY/index.php?q= [L]
# if directory or regular file...
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_URI} =/favicon.ico
# stop here
RewriteRule ^ - [L]
# if a regular file in SUBDIRECTORY directory
RewriteCond %{DOCUMENT_ROOT}/SUBDIRECTORY/%{REQUEST_URI} -f
RewriteRule .* SUBDIRECTORY/$0 [L]
# Redirect everything to /SUBDIRECTORY
RewriteRule .* /SUBDIRECTORY/index.php?q=$0 [QSA]
settings.php:
$settings['trusted_host_patterns'] = array(
'^127.0.0.1$',
'^localhost$',
'^www.example.com$'
);
PS. I have tried both localhost and an example website url like www.example.com but it didn't help. PS2. I am only using Firefox currently but I don't think the problem is with the browser.
I hope I was able to follow the question guidelines, I am really trying my best to make it a question "suitable" to the website, I am sorry if I made a mistake.
Edit1: I have rewrite already enabled.
rewrite
is enabled. If not, you can enable it by running this commandsudo a2enmod rewrite
then restart or reload your Apache conf by runningsudo service apache2 restart
. After that make sure that your Drupal clean URL is enabled..htaccess
.