From 70d16f95c573caf043523eb01e9efe7e311c47ec Mon Sep 17 00:00:00 2001 From: Almira Krdzic Date: Sat, 20 Oct 2018 13:46:02 +0200 Subject: [PATCH] test' --- backend.dockerfile | 6 +-- backend/.htaccess | 13 ----- .../admin/class-wiaas-admin-product.php | 3 -- backend/config/environments/test.php | 18 +++++-- docker/frontend/000-default.conf | 4 +- docker/php/000-default.conf | 50 +++++++++++++++++++ 6 files changed, 69 insertions(+), 25 deletions(-) delete mode 100644 backend/.htaccess create mode 100644 docker/php/000-default.conf diff --git a/backend.dockerfile b/backend.dockerfile index a459e4e..0b42a9a 100644 --- a/backend.dockerfile +++ b/backend.dockerfile @@ -51,7 +51,9 @@ COPY docker/php/setup.sh /init-scripts/ RUN chmod +x /init-scripts/setup.sh RUN docker-php-ext-install pdo pdo_mysql mysqli -RUN a2enmod rewrite ssl +RUN a2enmod rewrite +RUN a2enmod headers +COPY docker/php/000-default.conf /etc/apache2/sites-available COPY backend /home/wiaas/backend @@ -65,8 +67,6 @@ RUN cp -r backend/* /var/www/html/ WORKDIR /var/www/html RUN ln -s ../html api -COPY docker/php/.htaccess /var/www/html/ - RUN chown -R www-data:www-data /var/www/html CMD /init-scripts/setup.sh diff --git a/backend/.htaccess b/backend/.htaccess deleted file mode 100644 index 9308912..0000000 --- a/backend/.htaccess +++ /dev/null @@ -1,13 +0,0 @@ -# BEGIN WordPress - -RewriteEngine On -RewriteBase / -RewriteRule ^index\.php$ - [L] -RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule . /index.php [L] -RewriteCond %{HTTP:Authorization} ^(.*) -RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] - -SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 -# END WordPress diff --git a/backend/app/plugins/wiaas/includes/admin/class-wiaas-admin-product.php b/backend/app/plugins/wiaas/includes/admin/class-wiaas-admin-product.php index 9e9a047..d490818 100644 --- a/backend/app/plugins/wiaas/includes/admin/class-wiaas-admin-product.php +++ b/backend/app/plugins/wiaas/includes/admin/class-wiaas-admin-product.php @@ -107,9 +107,6 @@ class Wiaas_Admin_Product { $value = get_field('_wiaas_product_country', $post_id, true); $type = get_field('_wiaas_product_type', $post_id, true); - error_log($status); - error_log($value); - if (!empty($value) && $status === '_wiaas_no_country' ) { diff --git a/backend/config/environments/test.php b/backend/config/environments/test.php index d155f2e..73e7f41 100644 --- a/backend/config/environments/test.php +++ b/backend/config/environments/test.php @@ -1,8 +1,18 @@ + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + #ServerName www.example.com + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + + Options FollowSymLinks Indexes + AllowOverride None + + Header always set Access-Control-Max-Age "86400" + + RewriteEngine On + RewriteBase / + RewriteRule ^index\.php$ - [L] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule . /wp/index.php [L] + RewriteCond %{HTTP:Authorization} ^(.*) + RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] + + SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 + + + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + LogLevel emerg + + ErrorLog ${APACHE_LOG_DIR}/error.log + #CustomLog ${APACHE_LOG_DIR}/access.log combined + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet