You need to point your doc root to the public folder.
Cant not get .htaccess to work ?
Hello.
I have spent the whole day on this a could really use some help please.
I am trying to get my laravel site to run on a Digital Ocean Ubuntu 14.4 server running php 5.5.9 and apache2.
I have looked at the docs and various tutorials but i have had no luck.
When i go to mysite/phpinfo.php I can see in loaded modules "mod_rewrite"
My server file structure is /var/www/html The index and .htaccess files are in the default place /var/www/html/public
my .htaccess was the default one supplied:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
But that did not work so I tried the other one that is in the Laravel docs and that didnt work either:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
In my Digital Ocean server I have set up another user some instead of root it is rickyspires.
This is my set up there.
$ sudo a2enmod rewrite $ sudo service apache2 restart $ sudo nano /etc/apache2/sites-available/000-default.conf
<VirtualHost *>
ServerAdmin rickyspires@localhost
DocumentRoot /var/www/html/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
- When I go to my domain it shows a list of all the files in /var/www/html/
Thanks Ricky
My hunch is permissions problem. Probably need to change the storage folder to 777 or 755 if the folder is owned by the same user that runs apache.
Please or to participate in this conversation.