fix api access and url rewriting
This commit is contained in:
@@ -4,12 +4,12 @@ RUN docker-php-ext-install pdo pdo_mysql mysqli
|
|||||||
RUN a2enmod rewrite ssl
|
RUN a2enmod rewrite ssl
|
||||||
|
|
||||||
COPY backend /var/www/html
|
COPY backend /var/www/html
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
RUN ln -s ../html api
|
||||||
|
|
||||||
COPY docker/apache/apache2.conf /etc/apache2/
|
COPY docker/apache/apache2.conf /etc/apache2/
|
||||||
COPY docker/apache/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf
|
COPY docker/apache/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf
|
||||||
|
|
||||||
COPY docker/php/.htaccess /var/www/html/
|
|
||||||
|
|
||||||
RUN chown -R www-data:www-data /var/www/html
|
RUN chown -R www-data:www-data /var/www/html
|
||||||
|
|
||||||
RUN openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \
|
RUN openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
|
|
||||||
|
# BEGIN WordPress
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteBase /
|
RewriteBase /api/
|
||||||
RewriteRule ^index\.php$ - [L]
|
RewriteRule ^index\.php$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /api/index.php [L]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
# add a trailing slash to /wp-admin
|
# END WordPress
|
||||||
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
|
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -d
|
|
||||||
RewriteRule ^ - [L]
|
|
||||||
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
|
|
||||||
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
|
|
||||||
RewriteRule . index.php [L]
|
|
||||||
Reference in New Issue
Block a user