overhaul webserver: use rootless, simplify apache conf
parent
c84fd76bc8
commit
afa7b7fc00
|
@ -18,9 +18,9 @@ steps:
|
|||
validate: true
|
||||
|
||||
- name: deploy
|
||||
image: docker/compose:1.24.0
|
||||
image: docker/compose:1.29.1
|
||||
commands:
|
||||
- docker-compose up --build -d
|
||||
- docker-compose -p pmpc-website up --build -d
|
||||
volumes:
|
||||
- name: dockersock
|
||||
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/
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
CMD apache2-foreground
|
||||
COPY publiccode.eu.conf /vhosts/
|
||||
|
|
|
@ -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
|
||||
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
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
|
|
Loading…
Reference in New Issue