Note that there are some explanatory texts on larger screens.

plurals
  1. POLaravel 4 controller routes not working due to apache2 configuration
    primarykey
    data
    text
    <p>I'm trying to set up laravel on my local server at home and I can't seem to get controller routes working eg:</p> <pre><code>Route::controller('home','home'); </code></pre> <p>This code works on a server I have at work and I've read a few forums about the issue which claim the issue is because apache2 isn't configured to look at the .htaccess files.</p> <p>I've been messing around with that for a while but I still can't seem to get anything to work. I went into /etc/apache2/sites-available and created my own config file called site1 which looks like this:</p> <pre><code>&lt;VirtualHost *:80&gt; ServerAdmin webmaster@localhost DocumentRoot /var/www/laravel/ &lt;Directory /&gt; Options FollowSymLinks AllowOverride None &lt;/Directory&gt; &lt;Directory /var/www/laravel/&gt; Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all &lt;/Directory&gt; ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ &lt;Directory "/usr/lib/cgi-bin"&gt; AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all &lt;/Directory&gt; ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" &lt;Directory "/usr/share/doc/"&gt; Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 &lt;/Directory&gt; </code></pre> <p></p> <p>I then ran a2dissite default &amp;&amp; a2ensite site1 and /etc/init.d/apache2 restart but nothing happened.</p> <p>Thanks for your help and let me know if I need to clarify anything.</p> <p>Turns out apache isn't even reading the .htaccess file. I purposely wrote some nonsense in it that should have caused an error and it didn't.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload