Alias
Alias

Reputation: 3081

Laravel 4: Working directly on web server

Now I've searched and played around cannot get my head around what is going on.

I am unable to install a local webserver (XAMPP or w/e) onto this laptop, so I am hoping to have a play with Laravel 4 directly on my dedicated box.

I have a Linux box (Debian) with Apache, Composer and PHP 5.4.4 installed. Plenty of other websites up and running on this.

I have installed Laravel 4, via Composer directly into a directory: public_html/dev/

Apache is set-up so the sub-domain dev.mydomain.com points to this directory.

Going to dev.mydomain.com, or dev.mydomain.com/public/ (anything in-fact) gives me a 403 Forbidden error.

My apache config file:

    <VirtualHost (my ip)>
        ServerAdmin webmaster@localhost
        ServerName dev.mydomain.com
        DocumentRoot /home/user/public_html/dev
        Options -Indexes -FollowSymLinks -MultiViews
    </VirtualHost>

I've tried chmod 777 to public, the document root to /home/user/public_html/dev/public but with no luck.

Unless I'm missing the point of something here, or some security problem (since working on a live server isn't great) then please tell me, I'm probably being a noob.

Upvotes: 0

Views: 881

Answers (2)

Erik-Jan Riemers
Erik-Jan Riemers

Reputation: 1402

You had -FollowSymLinks, and i assume this applies to also the rewrite rule that comes default with laravel. (.htaccess file) removing the -Follosymlinks would have fixed it for you too i presume.

Upvotes: 1

Bjorn Theart
Bjorn Theart

Reputation: 121

Try this

<VirtualHost *:80>
    DocumentRoot /home/user/public_html/dev/public

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

    <Directory /home/user/public_html/dev/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>

Upvotes: 1

Related Questions