I'm trying to install a LAMPP Server on my freshly installed Debian distro, and I'm having issues running seeing the Apache site when I type localhost on my web browser. I've been doing research for the for a day now, and I still can't find what my problem is.

I have installed these packages apt-get -y install apache2 mysql-server php5 php5-mysql php-pear php5-gd

When I run systemctl start apache2 and systemctl start mysql I get active and running like it should.

But when I try to check if apache is working by opening the browser and typing localhost or the Apache Debian Default Page is not showing up. I have also tried installing XAMPP but when I start all the services only postgresql starts running.

The message I get when I run localhost on my browser:

You don't have permission to access / on this server. Apache/2.4.10 (Debian) Server at Port 80

Anyone has any suggestion or knows a solution to this?

  • If you see that then Apache is running, which you can easily check with ps
    – Gaius
    Aug 31 '16 at 17:05
  • @Rahul I have Apache/2.4.10 installed
    – Katz
    Aug 31 '16 at 17:11
  • can you please post content of /etc/apache2/apache2.conf file ?
    – Rahul
    Aug 31 '16 at 17:12
  • @Rahul here's the apache2.conf file ghostbin.com/paste/xp7eh
    – Katz
    Aug 31 '16 at 17:15

Replace line number 153-157 with below code in your apache2.conf

<Directory />
   Options Indexes FollowSymLinks MultiViews
   AllowOverride All
   Order allow,deny
   allow from all
   Require all granted

Then, do /etc/init.d/apache2 restart

  • I'm still getting the same error 403 forbidden
    – Katz
    Aug 31 '16 at 17:36
  • have you checked apache logs ?
    – Rahul
    Aug 31 '16 at 17:41
  • I just did, I think it might be because I removed the html folder inside www by accident, but I don't understand how is that related with apache because I think the folder was empty otherwise the errors I'm seeing in the log file is access to / denied (filesystem path '/var/www/html') because search permissions are missing on a component of the path or Permission denied: [client ::1:45630] AH00529: /var/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/' is executable I will change the permissions for /var/www/ to chmod -R 755 /var/www/
    – Katz
    Aug 31 '16 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.