0

I have been looking for information on google, laravel forums and youtube all day but no luck, hopefully someone can help.

I am currently trying to setup a website which was built by a web design company on my local machine but I it doesn't seem to be letting me do so.

At the moment the things I have done to get the website running locally are:

  1. Installed a WAMP server
  2. Changed the httpd.conf file to include conf/extra/httpd-vhosts.conf
  3. Changed the httpd-vhosts.conf file to include the following:

DocumentRoot "C:\wamp\www\ryl\public"

ServerName rateyourlecturer.dev

  1. Edited my drivers\etc\hosts.txt file to include the following:

127.0.0.1 localhost

127.0.0.1 rateyourlecturer.dev

But when I go and type rateyourlecturer.dev into the address bar the following error message appears "403 Forbidden - You don't have permission to access / on this server."

If anyone can help me solve this problem I will be really grateful.

learn
  • 290
  • 7
  • 26
  • Check this : http://stackoverflow.com/questions/8366976/wamp-error-forbidden-you-dont-have-permission-to-access-phpmyadmin-on-this-s – Mostafa Elgaafary Aug 20 '13 at 18:58
  • @MostafaAdly That is a different problem. I have seen numerous posts like that today all which don't work – learn Aug 20 '13 at 19:00
  • Sounds like your web root is the application directory instead of the public directory within it. You need to adjust, in your conf/extra/http-vhosts.conf file, where the app is so the .dev URL points to public/index.php (the public directory) rather than the application directory – fideloper Aug 20 '13 at 20:57
  • I added a new VHost directly to httpd.conf, now and it ran smoothly. Running latest WAMP with Win8. – Arda Aug 21 '13 at 08:21
  • @Arda what do you mean when you say you added a new vhost to httpd.conf? can you show me what you did as I'm still stuck. – learn Aug 21 '13 at 12:24
  • @user2701080 posting as answer, it's too long to type here. – Arda Aug 21 '13 at 12:34

2 Answers2

1

I simply added these codes in my httpd.conf, and it worked well:

<VirtualHost *:80>
ServerAdmin webmaster@me.com
DocumentRoot "C:/wamp/www/project_name/public"
ServerName project_name.dev
</VirtualHost>

<Directory "C:/wamp/www/project_name/public">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>

More information, here (it's for laravel 3, but vhost solution works for l4 etc, too)

Arda
  • 6,756
  • 3
  • 47
  • 67
0

*Follow its strictly,its 100% work *

1.you have to put laravel in C:\wamp\www folder

2.then u have to go application/config ....open application.php and change url='';

3.change key='K3u4UsHKh7AjSitP9VLTMtbd1mjvdzmQ'

4.then u have to go int C:\wamp\bin\apache\Apache2.2.21\conf\extra folder then open <<=== httpd-vhosts.conf ===>> file and paste below this line into that folder

DocumentRoot C:/wamp/www/laravel/public ServerName xxxxx.dev

5.then go C:\Windows\System32\drivers\etc folder and open <<=== hosts ===>> file then paste 127.0.0.1 xxxxx.dev

6.then go C:\wamp\www\laravel\public folder ...and then open a.htaccess ..then paste Options +FollowSymLinks RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php [L] 7.Then u have to go >> C:\wamp\bin\apache\apache2.2.22\conf << this directory & open httpd.conf & comment out this line

Virtual hosts

Include conf/extra/httpd-vhosts.conf

8.then go wamp server .....start it ..and click rewrite mode in apache->apache module..then restart wamp server

9.then go ur browser and write xxxxx.dev/docs ...

Rivel
  • 21
  • 4