New InstallServer script. Apache config added. Restserver install script updated

This commit is contained in:
2017-09-17 19:25:53 +02:00
parent dd5e759184
commit 4f824ba29a
3 changed files with 52 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
<VirtualHost *:80>
ServerName localhost
ServerAdmin lala@lala.de
DocumentRoot /var/www/html/public
<Directory /var/www/html>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

View File

@@ -1,6 +1,6 @@
#!/bin/bash
apt-get install libmicrohttpd-dev libjansson-dev libcurl4-gnutls-dev libgnutls28-dev libgcrypt20-dev
apt-get install libmicrohttpd-dev libjansson-dev libcurl4-gnutls-dev libgnutls28-dev libgcrypt20-dev -y
git clone https://github.com/babelouest/ulfius.git
cd ulfius/

36
installServer.sh Normal file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
#Install rest server
echo "Installing rest server and dependencies"
cd RestServer
./installscript.sh
make
make install
cd ..
#Install apache2 and dependencies
echo "Installing apache2 and php dependencies"
sudo apt install php7.0 php7.0-curl php7.0-gd php7.0-intl php7.0-mbstring php7.0-mcrypt php7.0-bz2 php7.0-cli php7.0-json php7.0-mysql php7.0-opcache php7.0-readline php7.0-xml php7.0-zip
echo "Configuring apache"
#Disable default apache config
sudo a2dissite 000-default.conf
#Copy and enable Apache Configs
cd ApacheConfigs
sudo cp laravel.conf /etc/apache2/sites-available
sudo a2ensite laravel.conf
#Rewrite aktivieren
sudo a2enmod rewrite
#Service neustarten
sudo service apache2 restart
cd ..
echo "Copying laravel files"
cp -r Laravel/* /var/www/html/
echo "Please create a .env File in /var/www/html"