1

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.

2 Answers2

1

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.

gmarintes
  • 1,288
  • 12
  • 16
  • Hi and thanks for your answer. Well, my i don't have Skype installed on my pc and Apache's homepage is working normally... I really don't know very much (almost nothing xD) about Apache logs, so I can't tell if it is all right or not (here are the later logs after restarting Apache and trying to access to `http://127.0.0.1/laravel/public/index.php`: [Apache error log](http://pastebin.com/WjDdCZWC).) I see something about Session Cache not being configured, but I just don't know if it affects Laravel and, if yes how it does it... – João Rivera Oct 21 '14 at 10:17
0

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).

Community
  • 1
  • 1
damiani
  • 7,071
  • 2
  • 23
  • 24
  • Thnks for the answer. I tried everything you said but it's still not working. Every timeI try to navigate to `http://127.0.0.1/laravel/public/index.php` the browser shows "unable to connect" message. – João Rivera Oct 21 '14 at 10:19
  • It may be an error in your SSL configuration? See updated answer for suggestions. – damiani Oct 21 '14 at 12:29
  • Hi and thanks again... SSL was not the issue. I found that my problem has nothing to do with Apache or Laravel conf. Actually, it was caused by some Blade comments that I had in my master.layout. However, the .htaccess is not working. I did configure the file as you suggested but got the same. I don't know if I should insist with this file or just set an Alias in Apache. – João Rivera Oct 21 '14 at 14:48