简体   繁体   中英

Laravel not working with wamp 2, can't even show home page through /index.php

I'm doing a traineeship in a Telecomunication Company. I'm responsable for making the back office, so I decided to make it on Laravel 4.2 (something new to me).

Actually, I already did the most of the project, but i'm having problems whan i try to deploy it into the server. I followed severel guides and tutorial but nothing worked ( image )

Server conf.: Apache/2.2.25 (Win32) mod_jk/1.2.37 mod_ssl/2.2.25 OpenSSL/0.9.8y mod_wsgi/3.3 Python/2.7.2 PHP/5.4.33RC1

Also I have enable mod_rewrite and ssl modules in httpd.conf, and open_ssl in php.ini

my .htaccess :

IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

I've also installed an identical environment on my personal pc and later updated to apache 2.4.9 and php 5.4. It didn't work either in both case.

PD: Sorry for my english

Update Chrome returns net::ERR_CONNECTION_RESET

Update 2

The problem was actually caused by some Blade comment statements ( {{-- the comment --}} ) in my master layout file. I replaced them with PHP comments ( <?php // the comment ?> ) and now the page is working flawless.

Connection reset means that your Apache is not running. Check the WAMP logs first before you do anything on Laravel config side.

Skype is known to use port 80 so try closing your Skype before starting Apache on WAMP.

Also, Apache configuration error may cause Apache not to start.

Some things to try:

• If what you posted is the complete contents of your .htaccess file, then it's missing a < at the beginning, and a closing </IfModule> at the end.

• Try using the alternate Laravel .htaccess file:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

• Try navigating to localhost/laravel/public/index.php

• Add a RewriteBase rule after your RewriteEngine On line:

RewriteBase /laravel/public/

...then navigate to just http://localhost (include the http:// prefix);

• Make sure the url setting in app/config/app.php is correct:

'url' => 'http://localhost/laravel',

• See if you can access http://127.0.0.1/laravel/public/index.php


Updated

• From your error log, it looks like SSL is not set up correctly. Do you need SSL for this? If not, try disabling it and see if your site loads. If you do need SSL, then there are many places that your SSL config can go astray. It's possible that the paths in your http.conf or httpd-ssl.conf are not set up properly; see http://forum.wampserver.com/read.php?2,121785 .

If they are, then see here or here for guides to setting up SSL correctly from the start, and see if your setup is correct (paying particular attention to making sure your file paths are right and that your certificates are set correctly).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM