overhaul webserver: use rootless, simplify apache conf
parent
c84fd76bc8
commit
afa7b7fc00
|
@ -18,9 +18,9 @@ steps:
|
||||||
validate: true
|
validate: true
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: docker/compose:1.24.0
|
image: docker/compose:1.29.1
|
||||||
commands:
|
commands:
|
||||||
- docker-compose up --build -d
|
- docker-compose -p pmpc-website up --build -d
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
<VirtualHost *:80>
|
|
||||||
ServerName www.publiccode.eu
|
|
||||||
Redirect permanent / https://publiccode.eu/
|
|
||||||
</VirtualHost>
|
|
||||||
|
|
||||||
<VirtualHost *:80>
|
|
||||||
ServerName publiccode.eu
|
|
||||||
|
|
||||||
RedirectMatch permanent "^/zh_tw/?(.*)$" "/zh-tw/$1"
|
|
||||||
|
|
||||||
ServerAdmin contact@fsfe.org
|
|
||||||
DocumentRoot /var/www/html
|
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
||||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
||||||
|
|
||||||
<Directory /var/www/html/>
|
|
||||||
Options FollowSymLinks Includes
|
|
||||||
AllowOverride All
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
10
Dockerfile
10
Dockerfile
|
@ -1,9 +1,5 @@
|
||||||
FROM php:7-apache
|
FROM bitnami/apache:2.4
|
||||||
|
|
||||||
COPY site/public/ /var/www/html
|
COPY site/public/ /app/
|
||||||
|
|
||||||
COPY 000-default.conf /etc/apache2/sites-enabled/
|
COPY publiccode.eu.conf /vhosts/
|
||||||
|
|
||||||
RUN a2enmod rewrite
|
|
||||||
|
|
||||||
CMD apache2-foreground
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<VirtualHost *:8080>
|
||||||
|
ServerName publiccode.eu
|
||||||
|
|
||||||
|
ServerAdmin contact@fsfe.org
|
||||||
|
DocumentRoot /app
|
||||||
|
|
||||||
|
<Directory /app/>
|
||||||
|
Options FollowSymLinks Includes
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
|
@ -1,6 +1,9 @@
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteBase /
|
RewriteBase /
|
||||||
|
|
||||||
|
# redirect wrong language code we used before
|
||||||
|
RewriteRule ^zh_tw/?(.*)$ /zh-tw/$1 [L,R=301]
|
||||||
|
|
||||||
# redirect all requests to non-existing translations to EN
|
# redirect all requests to non-existing translations to EN
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
|
Loading…
Reference in New Issue