Search code examples
phpapachelaravelwampbitnami

my bitnami wamp vhost doesn't working properly


I use:

  • Windows 7 Ultimate x64
  • Bitnami WAMP Stack 5.6.22-0
  • Laravel 5

What I have done:

  1. Edit my %systemroot%\System32\drivers\etc\hosts file by adding 127.0.0.1 juke.dev in the end of the line
  2. Edit my httpd.conf by
    • uncomment the line LoadModule vhost_alias_module modules/mod_vhost_alias.so
    • uncomment the line Include conf/extra/httpd-vhosts.conf
  3. Edit my httpd-vhosts.conf into this:

    <VirtualHost *:80>
        ServerAdmin root@localhost
        DocumentRoot "C:/WAMP/apache2/htdocs/claim/public"
        ServerName juke.dev
            <Directory "C:/WAMP/apache2/htdocs/claim/public">
            Require all granted
            </Directory>
    </VirtualHost>
    
  4. Install composer and laravel5

  5. Edit my laravel5 routes.php into this:

    Route::get('/', 'WelcomeController@index');
    Route::get('contact', 'WelcomeController@contact');
    
  6. And the WelcomeController is like this:

SS controller

Now into the problem

  • When I go to juke.dev, it success.

juke.dev ss

  • When I go to juke.dev/contact, it fails.

juke.dev/contact SS

  • When I go to localhost/claim/public/contact, it success.

enter image description here

What did I do wrong?

I'm still new in web programming, so any explanation would be help


Solution

  • strange problem:

    This is an example of my vhost:

    <VirtualHost *:80>
        DocumentRoot "G:\Google Drive\Data\Proj\public"
        ServerName rethinkdb.i
        ServerAlias www.rethinkdb.i
        <Directory "G:\Google Drive\Data\Proj\public">
        AllowOverride All
        Require all Granted
        </Directory>
    </VirtualHost>
    

    The other thing I can think is maybe your .htaccess file.
    How does that look?

    Edited: Just tried with your vhost, and have the same problem. So try to use the virtualhost here above.