IMPORTANT NOTES:
- If are you running an Operating Systems with SELinux (or others security modules):
SELINUX WILL CAUSE A LOT OF PROBLEMS. DISABLE IT!
(the following command temporary disable SELinux, it will be up again at next restart)
#>sudo setenforce 0
------------------------------------------
-
Install PHP and apache:
#>sudo apt install apache2 php libapache2-mod-php php-mysql php-mbstring php-gettext
-
Install phpMyAdmin (during installation it will ask if you want to use "Apache2" or "Lighttpd", select "Apache2"):
#>sudo apt install phpmyadmin
#>sudo phpenmod mbstring
-
Enable and start apache2 service:
#>sudo systemctl start apache2
#>sudo systemctl enable apache2
-
Set User and Server permission:
#>sudo chown YOUR-USERNAME:www-data -R /PATH/TO/REPO/NeuralNetworkBuilder/website
#>sudo chmod -R 775 /PATH/TO/REPO/NeuralNetworkBuilder/website
#>sudo usermod www-data --append --groups YOUR-USERNAME
#>sudo usermod YOUR-USERNAME --append --groups www-data
-
If
sites-available/
andsites-enabled/
directories doesn't exists, than create it:
#>sudo mkdir /etc/apache2/sites-available
#>sudo mkdir /etc/apache/sites-enabled
-
Create a config file for laravel:
Intoutils/apache_conf/
folder you will find a confing file namedneuralnetworkbuilder.conf
.
Copy the config file and Paste it into/etc/apache2/sites-available/
.
Edit now the config file with your properly data. -
OPTIONAL CHANGES. Add the virtual host
neuralnetworkbuilder
:
#>echo "127.0.0.1 neuralnetworkbuilder" >> /etc/hosts
-
Create a
neuralnetworkbuilder.conf
softlink fromsites-available/
tosites-enabled/
directory:
#>sudo a2ensite neuralnetworkbuilder.conf
-
Disable default config (remove softlink from
sites-enabled
):
#>sudo a2dissite 000-default.conf
-
Add the following line at the end of
/etc/apache2/apache2.conf
file:
#> sudo echo "IncludeOptional sites-enabled/*.conf" >> /etc/apache2/apache2.conf -
Enable "rewrite" module:
#>sudo a2enmod rewrite
-
Add the server port to
/etc/apache2/ports.conf
:
#>sudo echo "Listen 8080" >> /etc/apache2/ports.conf
-
Test if apache config it's ok:
#>apachectl configtest
If the command output shows "Syntax OK
", then you setting up everythings okay. -
Reload/Restart apache server:
#>sudo systemctl reload apache2.service
#>sudo systemctl restart apache2.service