Skip to content

Installation (Windows using WAMP stack)

pierobot edited this page Jun 8, 2020 · 15 revisions

Installing on Windows

This guide assumes the usage of Bitnami's WAMP stack.
YMMV using other stacks or standalone programs.

Requirements

You can use a pre-configured and bundled stack with WAMP or XAMPP that contains all the programs below except redis and composer.

Database

If you are using Bitnami's WAMP stack, navigate to localhost/phpmyadmin and run the following SQL code. Otherwise, use your commandline client to run the following SQL code. Alter the password to what you want.

create user 'mangapie'@'localhost' identified by 'mangapie';
create database mangapie;
grant all privileges on mangapie.* to 'mangapie'@'localhost';
flush privileges;

Web server

Apache will need the following modules:

  • mod_xsendfile
    • After extraction, copy bin/Apache24/Win64/mod_xsendfile.so to your Apache's modules directory.

Edit your Apache's conf/httpd.conf and add the following lines if they are missing or commented out.

LoadModule xsendfile_module modules/mod_xsendfile.so

Create a directory in C:/Bitnami/wampstack/apps named mangapie.
Inside mangapie, create another directory named conf.
Inside mangapie/conf, create a file named httpd-app.conf and put the following inside:

<IfModule !xsendfile_module>
    LoadModule xsendfile_module modules/mod_xsendfile.so
</IfModule>

<Directory "C:\Bitnami\wampstack/apps/mangapie/public">
    Options +MultiViews
    AllowOverride All
	
    <IfVersion < 2.3 >
        Order allow,deny
        Allow from all
    </IfVersion>
    <IfVersion >= 2.3>
        Require all granted
    </IfVersion>

    XSendFile on
</Directory>

<Directory "C:\Bitnami\wampstack/apps/mangapie/public/public">
    XSendFilePath "C:\Bitnami\wampstack/apps/mangapie/storage/app/public"
</Directory>

Inside mangapie/conf, create a file named httpd-vhosts.conf. Put the following inside:

<VirtualHost mangapie:80>
    ServerName mangapie
    ServerAlias mangapie
    DocumentRoot "C:\Bitnami\wampstack/apps/mangapie/public"
    
    Include "C:\Bitnami\wampstack/apps/mangapie/conf/httpd-app.conf"
</VirtualHost>

<VirtualHost mangapie:443>
    ServerName mangapie
    ServerAlias mangapie
    DocumentRoot "C:\Bitnami\wampstack/apps/mangapie/public"
	
    SSLEngine on
    SSLCertificateFile "C:\Bitnami\wampstack/apps/mangapie/conf/certs/server.crt"
    SSLCertificateKeyFile "C:\Bitnami\wampstack/apps/mangapie/conf/certs/server.key"
    
    Include "C:\Bitnami\wampstack/apps/mangapie/conf/httpd-app.conf"
</VirtualHost>

Inside mangapie/conf create a directory named certs. This is where your certificate and key will be placed.
For testing purposes, you can simply copy server.crt and server.key from C:\Bitnami\wampstack\apache2\conf.

Inside mangapie/conf, create a file named httpd-prefix.conf and put the following inside:

Alias /mangapie/ "C:\Bitnami\wampstack/apps/mangapie/public/"
Alias /mangapie "C:\Bitnami\wampstack/apps/mangapie/public"

Include "C:\Bitnami\wampstack/apps/mangapie/conf/httpd-app.conf"

In C:/Bitnami/wampstack/apache2/conf/bitnami/bitnami-apps-prefix.conf add the following line

Include "C:/Bitnami/wampstack/apps/mangapie/conf/httpd-prefix.conf"

In C:/Bitnami/wampstack/apache2/conf/bitnami/bitnami-apps-vhosts.conf put the following:

Include "C:\Bitnami\wampstack/apps/mangapie/conf/httpd-vhosts.conf"

Edit your C:/system32/drivers/etc/hosts file with administrator privileges and add

127.0.0.1 mangapie

PHP

The following additional modules are required with Bitnami's WAMP stack:

  • rar
    • Extract and copy php_rar.dll to C:/Bitnami/wampstack/php/ext/
  • redis
    • Extract and copy php_redis.dll to C:/Bitnami/wampstack/php/ext/

Edit C:/Bitnami/wampstack/php/php.ini and add or uncomment the following lines:

extension=fileinfo
extension=intl
extension=rar
extension=redis

Mangapie

Add your PHP's installation to the PATH environment variable. In our case, it is C:/Bitnami/wampstack/php
Additionally, make sure your composer installation is also in your PATH environment variable.

Copy mangapie's repository to C:/Bitnami/wampstack/apps/.

Copy the .env.example file to .env and edit the following variables if you need changed anything.

# If you set to true, then you will need to install the dev composer packages. 
APP_DEBUG=false
APP_URL=https://mangapie
APP_WEB_SERVER=apache

DB_DATABASE=mangapie
DB_USERNAME=mangapie
DB_PASSWORD=mangapie

CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_DRIVER=redis

Open a command prompt and run the following:

cd C:/Bitnami/wampstack/apps/mangapie
composer install --no-dev
php artisan mangapie:init
php artisan config:cache

Mangapie requires you to have a queue worker running or some features may not work.

cd C:/Bitnami/wampstack/apps/mangapie
php artisan queue:work --timeout=0 --tries=1

Restart your Apache web server using the WAMP Stack Manager Tool.

Navigate to https://mangapie and login using username dev and password dev.
Be sure to change the dev account's password.