Skip to content

Commit

Permalink
Merge pull request ZoneMinder#1846 from mnoorenberghe/docker_vhost
Browse files Browse the repository at this point in the history
Use misc/apache.conf instead of utils/docker/apache-vhost in docker
  • Loading branch information
connortechnology authored Apr 6, 2017
2 parents b609b9a + a1f0ec3 commit b4ac277
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ADD utils/docker/start.sh /tmp/start.sh
RUN chown -R www-data:www-data /usr/local/share/zoneminder/

# Adding apache virtual hosts file
ADD utils/docker/apache-vhost /etc/apache2/sites-available/000-default.conf
RUN cp misc/apache.conf /etc/apache2/sites-available/000-default.conf
ADD utils/docker/phpdate.ini /etc/php5/apache2/conf.d/25-phpdate.ini

# Expose http ports
Expand Down
11 changes: 10 additions & 1 deletion misc/apache.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@
# Some values may need to manually adjusted to suit your setup
#
<VirtualHost *:80>
ServerName @WEB_HOST@
ServerAdmin webmaster@localhost

DocumentRoot "@WEB_PREFIX@"
Alias /zm/ "@WEB_PREFIX@/"
<Directory "@WEB_PREFIX@">
Options -Indexes +FollowSymLinks
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>

ScriptAlias /cgi-bin "@CGI_PREFIX@"
Expand Down
14 changes: 0 additions & 14 deletions utils/docker/apache-vhost

This file was deleted.

3 changes: 3 additions & 0 deletions utils/docker/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ mysql -u root < db/zm_create.sql
# Add the ZoneMinder DB user
mysql -u root -e "grant insert,select,update,delete,lock tables,alter on zm.* to 'zmuser'@'localhost' identified by 'zmpass';"

# Make ZM_LOGDIR
mkdir /var/log/zm

# Activate CGI
a2enmod cgi

Expand Down

0 comments on commit b4ac277

Please sign in to comment.