Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to autostart XAMPP and Laravel project in Windows

I need to setup my Laravel application and XAMPP locally in Windows so that it can be accessed from multiple PCs in my local network. I've set it up successfully, but now I want to autostart my Laravel application and XAMPP when Windows is started.

like image 573
Inversemaha Avatar asked Oct 18 '25 06:10

Inversemaha


2 Answers

To autostart XAMPP modules is really simple. Follow the steps:

STEP 1: enter image description here

STEP 2: Enable apache and mysql enter image description here

RESTART THE XAMPP APPLICATION and you will see that will initialize automatically on your pc startup.

To autostart the laravel project, i think by adding your editor in the task manager, start up applications, will automatically open your editor with the project.

like image 65
mindmaster Avatar answered Oct 21 '25 02:10

mindmaster


I've solved the problem. I am using XAMPP under Windows OS. These are the steps on how to autustart Laravel Project on localhost. First you have to Enable virtual host configuration like under those steps:

  1. Set virtual host in "C:\xampp\apache\conf\extra\httpd-vhosts.conf".
    The add a new virtual host (e.g: ship.com)

# Virtual host of ship.com
<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs\ship-management-master\public"
    ServerAdmin ship.com
    <Directory "C:\xampp\htdocs\ship-management-master\public">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Now have to add your Laravel Project public folder path into "DocumentRoot" and "Directory".
  1. “C:\Windows\System32\drivers\etc\hosts” file, enter host entry.

    a) Go to Start Menu, Right-Click on Notepad++ page and choose Run as Administrator.
    b) Then got to
    “File->Open->C:\Windows\System32\drivers\etc\hosts”
    uncomment " 127.0.0.1 ship.com"
    and replace "localhost" name to your virtual host name aslike " 127.0.0.1 ship.com"
    c) If you couldn’t see the files, change File Type : All files and enter host entry in host file.

  2. Restart your Apache server and browse “ship.com”.
like image 36
Inversemaha Avatar answered Oct 21 '25 02:10

Inversemaha