1

I'm trying to build a web app in laravel 5.2 on windows platform with wamp server installation.

I'm trying to call a dashboard page by following routes:

Route::get('nitsadmin/dashboard', function () {
    return view('nitsadmin.dashboard');
});

Following is the route list:

enter image description here

where my file structure is as below:

enter image description here

My virtual host configuration in httd-vhosts.conf file:

<VirtualHost *:80>
    DocumentRoot "c:\wamp\www\nitsedit\public"
    ServerName nitseditor.dev
</VirtualHost>

Apache alias:

Alias /nitseditor.dev "C:/wamp/www/NitsEdit/public" 

<Directory "C:/wamp/www/NitsEdit/public">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    Allow from all
 </Directory>

Don't know where I'm getting problem but I'm getting following error:

enter image description here

Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148

3 Answers3

0

You have wrong web server configuration, just point web server to a public directory in Lararel project root and restart web server.

Community
  • 1
  • 1
Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279
  • I'm getting an error whenever I type my nitseditor.dev it shows localhost also when I type `http://nitseditor.dev/nitsadmin/dashboard` I get an error of `The request url not found. Apache/2.4.9 (Win64) OpenSSL/1.0.1g PHP/5.5.12 Server at nitseditor.dev Port 80 ` – Nitish Kumar Jun 02 '16 at 04:46
0

You're using the wrong URL, ditch the "nitsedit\public" part: http://nitseditor.dev/nitsadmin/dashboard

Apache is already pointing the user to the public folder.

Alberto
  • 880
  • 5
  • 15
  • I get an error of `The request url not found. Apache/2.4.9 (Win64) OpenSSL/1.0.1g PHP/5.5.12 Server at nitseditor.dev Port 80` – Nitish Kumar Jun 02 '16 at 04:46
  • remove this line from the apache config, think that might be where the conflict is coming from: Alias /nitseditor.dev "C:/wamp/www/NitsEdit/" – Alberto Jun 02 '16 at 04:50
  • make sure to restart apache after that. – Alberto Jun 02 '16 at 04:51
  • hmm.. ok.. you had the server pointing to laravel correctly before (that screenshot is laravel), so maybe pointing that alias to the right folder would help? Alias /nitseditor.dev "C:/wamp/www/NitsEdit/public/" – Alberto Jun 02 '16 at 05:03
  • I commented out `Include conf/extra/httpd-vhosts.conf` in the file `httpd.conf`present in folder `apache/conf` and it worked. – Nitish Kumar Jun 02 '16 at 07:12
0

Just commented out Include conf/extra/httpd-vhosts.conf in the file httpd.conf present in folder wamp/bin/apache/apache2.4.9/conf and it worked.

Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148