php - Having trouble with Ubuntu LAMP stack


I have installed Ubuntu 16.04 LTS, Apache2, Mysql 14, Php7. I have installed Drupal with a few difficulties. Specifically, I had to install php extensions and tweak the configs to enable those extensions, and finally the installation was successful. However, whenever I try to click on any link, the 404 Not found error page pops up. So technically I can't go anywhere beyond the CMS homepage. I installed another CMS, the same problem, can see the homepage, nothing beyond. Did anyone ever had this kind of issue? I tried the following three: changed the CMS folder ownership to www-data:www-data (my CMS folder is drupaltest)

sudo chown -R /var/www/html/drupaltest

in /etc/apache2/apache.conf file, added

<Directory /var/www/html/drupaltest/> 
  AllowOverride All

And also:

sudo a2enmod rewrite

1 Answer: 

I feel like you're missing .htaccess file. Usually its a hidden file, so make sure to show all files (including hidden files) and copy it and paste it into your local drupal folder.

Also,make sure you local server has mod_rewrite enabled to support clean URLs, if its not enabled then check this answer: How to enable mod_rewrite in Apache?.

Another suggestion is to turn off Clean URL from settings.php by adding the following code:

$conf['clean_url'] = 0;

if all these above step not working then please explain little more about your problem .


More Articles

linux - List out text files from given directory in unix

Writing shell script to sort text file data from given directory with for loop in ubuntu as: echo "Enter directory Name" read dr path= ` find /home/user -name $dr ` for x in ` ls *.txt $path ` do sort $x done echo "------Script finished-------"But this script is giving me er

c - Whats the difference between the two command lines? (SegFault)

I have written a code that maps to a shared memory location,so that the first program opens a shared memory block and stores some data in it.And the second program reads the shared data.Whats the difference between the two command lines:1. if(argc<2) { printf("USAGE:%s text-to-share\n",argv[0

shell - monitor for file then copy to another directory

I'm relatively new to unix scripting, so apologies for the newbie question.I need to create a script which will permanently run in the background, and monitor for a file to arrive in an FTP landing directory, then copy it to a different directory, and lastly remove the file from the original directo

Why does the following code raise a SegFault. c(Linux)

This a code that would reverse the data of a document and save it in the same document itself.However I am getting a Segmentation Fault.Please Help,I don't know why it gives a SegFault.#include <stdio.h>#include <stdlib.h>#include <termios.h>#include <fcntl.h>#include <str

mysql - Apache2 / phpmyadmin - PHP isn't working

I was working on a project of mine . then i had to restart the computer.Once I did suddenly PHP stopped working on Apache. then i starting looking into the configuration files and error logs and fixed a spelling error in the config file, but STILL the problem persisted, then i decided to re-install

Segmentation Fault Core dump with C on ubuntu

I have a problem with some line of codes I've written in plain C.It worked fine on windows, but on ubuntu there's an error saying "Segmentation Fault (core dumped)". I've searched for answers but there's too many problem that can caused that error.char line[80];char sett[50][80];int index=0;static c

linux - Docker run command error

I have just installed docker and pulled their official ubuntu image following their documentation installation tutorial.However, when I get to the point of executing a command in a specific container, I end up with the following error:Error: Cannot start container f6e1084236794548bbd5cd059f46f916367

c - Encountering segment fault when printing out directories in Ubuntu

I've been working on this code for a while and I can not figure out the problem. The idea is to print out all directories and sub directories from the given directory (hard coded for testing purposes). However, I keep getting a segmentation fault.#include <stdio.h>#include <dirent.h>#in

bash - attempting to recreate supervisor tutorial in docker, running into error (permissioning?)

I'm attempting to recreate the steps in this tutorial in a docker context, ubuntu image installed under coreos running in virtualbox on OS X.I've set up a Dockerfile that has the following steps:# Install docker basicsRUN echo "deb precise main universe" > /etc/ap

linux - Dockerfile won't run script as user with sudo rights

I have this Docker file...FROM ubuntu:14.04 MAINTAINER Sindhu S RUN apt-get update && apt-get -y install sudo wget bash git && rm -rf /var/cache/apt-get/archives/*RUN adduser --disabled-password --gecos "" scrollback RUN adduser scrollback sudo RUN ech