In general, we do not recommend using XAMPP for Snipe-IT, as there is a built-in alias for
/licensesthat you'll have to override, which can be a bit of a pain. We recommend WAMP or IIS instead if you're running on Windows, but we provide these instructions in case WAMP is not an option.
Download the Snipe-IT project using one of the methods on the Download page. We strongly recommend installing via Git.
Follow the directions in the configuration section of the normal setup.
Download XAMPP from the official site.
In order to install required library dependencies, you'll need to install Composer. You can download Composer from the official source here.
After Composer is installed, open a Windows terminal and type
composer to execute commands:
Use the following command from the Snipe-IT project root to install the required dependencies:
composer install --no-dev --prefer-source
For the purposes of this example, we will configure the domain
We need to edit
httpd-vhosts.conf that is located in
C:\xampp\apache\conf\extra\httpd-vhosts.conf and add following lines at the end of the file:
# VirtualHost for SNIPE-IT.LOCAL <VirtualHost laravel.dev:80> DocumentRoot "C:\xampp\htdocs\snipe-it\public" ServerAdmin snipe-it.local <Directory "C:\xampp\htdocs\snipe-it"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # # We have to use this script alias for Snipe-IT because # XAMPP has a built-in URL for /licenses. # See https://github.com/snipe/snipe-it/issues/4031 for more info ScriptAlias /licenses/ "C:\xampp\htdocs\snipe-it\public" </VirtualHost>
After this, our apache is listening to
snipe-it.local connections, but we have to configure our hosts file that allows to redirect
snipe-it.local to the localhost that is located in
Edit your hosts file, adding our localhost for
# localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 127.0.0.1 snipe-it.local
As we mentioned at the top of the page, XAMPP comes with a "built-in" URL of
/licenses, so in order for the licenses page to load, you'll need to remove that built-in configuration. If you don't perform this next step, you'll get something like this when you click on the licenses section of Snipe-IT.
To remove this built-in XAMPP alias, edit your
httpd-xampp.conf in your XAMPP config and delete lines below:
In your XAMPP interface, start Apache and MySQL:
Now when you go to
snipe-it.local in your browser, it should lead you to the setup.
Note: screenshots via Codementor.
Updated about a year ago