Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

I upgraded to Ubuntu 13.10. At first when running apache after the update, there were missing/broken files, so I simply re-installed apache. I backed up the vhost file.

When trying to access my Laravel project from the browser, it get a 403 error. I have changed the permissions of the root folder multiple times, but it is still forbidden. I do not believe this is a laravel problem, as I already fixed it on 13.04, and I am using the same files.

Here is my 000-default.conf file, located in /sites-enabled and /sites-available. My apache2.conf file is unchanged since install.

<VirtualHost *:80>
    DocumentRoot /home/brennan/development/MasonACM/public

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    <Directory /home/brennan/development/MasonACM/public/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
</VirtualHost>

It should also be important to note that my .htaccess file is not missing, and hasn't been changed since the site was working on 13.04.

UPDATE:

I have apache's host settings working now, but now the browser is displaying the actual code of index.php, meaning apache isn't using php for some reason. I just checked that php was installed, so why wouldn't apache recognize it?

share|improve this question
    
See stackoverflow.com/a/19729573/911550 for your php problem. – parvus Nov 4 '13 at 17:31
up vote 44 down vote accepted

Apache2 may have also been upgraded to version 2.4, and there are a few things to note.

First, do you have Apache 2.4.x+ now? Check by running:

$ apache2 -v

If so, your vhost needs some adjustment:

First: +/- on Options:

Some Options parameters needs the +/- syntax. Read more here. This might be especially important when mixing +/- on some directives (read the previous link to see more).

Change:

Options Indexes FollowSymLinks MultiViews

to:

Options +Indexes +FollowSymLinks +MultiViews

Second: Allow/Deny

Apache now does access control via mod_authz_host

Change:

Order allow,deny
Allow from all

to:

Require all granted

Some more info here on upgrading from Apache 2.2 to 2.4.

share|improve this answer
    
Thanks for replying. I am running version 2.4.6 (Ubuntu). I made the changes, but I'm still getting the 403. I also noticed when I start the server I see "Could not reliably determine the servers fully qualified domain name" which I did not have before, and is odd since I have Servername set on the vhost file. – Brennan Hoeting Oct 20 '13 at 20:31
    
Update: I was able to get regular PHP to render by following these guidelines. If anyone is having a problem with Laravel and not raw PHP, look into reinstalling Mcrypt. Also restart your computer if you make changes and it still doesn't work (I could've saved an hour if I'd known that). – Brennan Hoeting Oct 24 '13 at 11:40
1  
i love you! thx saved my day! – Max Małecki Oct 25 '13 at 15:10
    
@Max Małecki : I just wanted to paste the exact same text :D – nozzleman Jun 5 '14 at 17:49
    
Beautiful, thanks for knowing what needed to change! – Jason O'Neil Aug 23 '14 at 8:39

I had the same problem, for some reason restarting Apache with Sudo made a difference. Are mods rewrite and mcrypt healthy?

share|improve this answer
1  
Apache should definitely be restarted / managed using sudo. – fideloper Oct 22 '13 at 21:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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