diff --git a/Source/API/Dockerfile b/Source/API/Dockerfile index fe7f4ab..17512c3 100644 --- a/Source/API/Dockerfile +++ b/Source/API/Dockerfile @@ -4,4 +4,7 @@ RUN docker-php-ext-install pdo pdo_mysql COPY ./script /var/www/html WORKDIR /var/www/html/Config RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -RUN composer update && composer install \ No newline at end of file +RUN composer update && composer install +RUN a2enmod rewrite +RUN a2enmod actions +RUN service apache2 restart \ No newline at end of file diff --git a/Source/API/script/.htaccess b/Source/API/script/.htaccess new file mode 100644 index 0000000..66ef8f6 --- /dev/null +++ b/Source/API/script/.htaccess @@ -0,0 +1,4 @@ +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^ index.php [QSA,L] diff --git a/Source/API/script/index.php b/Source/API/script/index.php index 32f8dc2..8766c65 100644 --- a/Source/API/script/index.php +++ b/Source/API/script/index.php @@ -14,7 +14,7 @@ use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Slim\Factory\AppFactory; -require 'Config/vendor/autoload.php'; +require './Config/vendor/autoload.php'; /** * Instantiate App