Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GonG's avatar
Level 1

Deploy Laravel 5 Production on Windows 7

Hi, my question might be a little off topic but I got no where to go.

I have to deploy Laravel 5 application for use internally and I have to install web server on PC running Windows 7. According to these scenario, please suggest what should I use ?

My current approaches are:

  1. Put application in WAMP server and set VirtualHost to serve. I've tried this many times, but I can't get it running. My hypothesis is that may be because I developed on Mac using Homestead, and when I copy application to Windows, it seems to treat file .env differently, if not I'm sorry. Did anyone encounter problems when developed on Mac and deploy on Windows ?

  2. Should I use Homestead to serve Laravel 5 application on production ? I don't think I should but this is will be considered if others approaches don't work.

If you have others way, please tell me. Thank you.

0 likes
12 replies
bestmomo's avatar

Hello,

WAMP on Windows works fine. What is the issue ?

GonG's avatar
Level 1
  1. I copy application folder and paste it on C:\wamp\www
  2. Edit file C:\Windows\System32\drivers\etc\hosts to include
127.0.0.1       myapp.app
  1. Uncomment in file C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf that says
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
  1. Edit file C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf to include
<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/myapp/public"
    ServerName myapp.app
</VirtualHost>
  1. Start WAMP all service
  2. Go to myapp.app/login in the browser and it says
Not Found
The request URL /login was not found on this server.

I've tried fresh install of Laravel 5 and do the same steps above and it works fine! Any suggestion ? Thanks.

Creed06's avatar

i did install Bitnami https://bitnami.com/stack/wamp for my local test and it's work fine this stack support laravel 5 all you have to do is to set your conf and host file and voila

also

<VirtualHost 192.168.2.10:80>
    ServerAdmin mymail@localhost
    ServerName dev.laravel5
    DocumentRoot "C:/Bitnami/wampstack-5.4.36-0/frameworks/laravel/laravel5/public"
    <Directory "C:/Bitnami/wampstack-5.4.36-0/frameworks/laravel/laravel5/public/">
    Options +MultiViews
    AllowOverride All
        <IfVersion < 2.3 >
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.3>
            Require all granted
        </IfVersion>
    </Directory>
</VirtualHost>

Creed06's avatar

Be sure that you add : AllowOverride All for enable htaccess else it wont have effect

davidxd33's avatar

Seems .htaccess probably isn't being read to form the pretty urls. You can add AllowOverride All to your virtual host

GonG's avatar
Level 1

Thanks guys. I didn't touch anything inside .htaccess file because I'm not familiar with it, sorry. Laravel is my first time on Backend world :) I tried add AllowOverride All like this:

 <VirtualHost *:80>
    DocumentRoot "C:/wamp/www/myapp/public"
    ServerName myapp.app
    AllowOverride All
</VirtualHost>

but WAMP cannot become green, it stays in orange state. I will try both Laragon and Bitnami.

Just curious, could it be that Windows treat dotFile differently or something like permission to look at .htaccess file ?

bestmomo's avatar

@GonG if WAMP stays orange it's a WAMP issue, not a Laravel one. Windows manages .htaccess without problem.

GonG's avatar
Level 1

Hi, it's a little bit late but finally I got it worked using Laragon. Installed plus a few clicks and it just work!

Thanks you very much guys.

bestmomo's avatar

@GonG I tried Laragon on Windows 8 and it works fine but I didn't get virtual host to work automatically as they said. Did you get them ?

A last I keep WAMP because I better control the system.

Please or to participate in this conversation.